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.
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.