Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jetdirect printer deletes from spool before printing

Status
Not open for further replies.

mwendell

Programmer
Dec 11, 2003
2
GB
I am writing a VB6 app (on Windows 2000) that creates special stationery using XML and PCL6 commands to an HP 2300dtn printer.
I am using the winspool API commands eg GetPrinter and Writeprinter etc (to preserve the PCL escape sequences) to print to the HP.
I am also trying to track the progress of the print job I create to notify the user if the job has printed OK through the EnumJobs and the above APIs.
This works fine when I print to an old laserjet 4 series but when I print to the 2300 the job disappears from the spool queue before it is actually printed. This means that the enumjobs api cannot tell if the job has encountered a problem as the spool queue thinks it has already been printed (removed totally from the queue).
There is an HP utility that I installed 'Printer Status and Alerts' that successfully tracks the progress of the job even after it has gone from the Windows spool queue and the printer icon in the systray does in fact remain there until the job has physically printed.

The problem seems to be caused by the presence of the Jetdirect print server which is pulling down the print job from the network print server and storing it before it actually gets to print.

I need to find a way to either stop the job disappearing from the spool before it has printed - by either disabling jetdirect or configuring the network print server to hold onto its copy - or to use whatever API calls etc the 'Printer Status and Alerts' or the Systray printer app are using that seem to know when the job has physically been printed.

Your help would be greatly appreciated.
 
One additional thought - is the enumjobs API the wrong call to be using in this situation and does another API do the job better eg findnextprinterchangenotification ????
 
I don't know the answer to your question, but I can offer a few observations:[ul]
[li]The purpose of the Jetdirect card is to accept data from the network; once it has received a job (defined by the lpr protocol, for example) and forwarded to the printer (memory) it will return success, and will have no knowledge of the success or otherwise of what subsequently happens to that data.
[li]I would hazard a guess that the 'Printer Status and Alerts' utility uses (2-way) port 9100, but just what protocol is used I don't know. It may be proprietary to HP (although I don't think so).
[li]I'm surprised that the LaserJet 4 responds to PCL6 commands because it only supports PCL5, which is a totally different language.
[/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top