RequestPrinterStatus
Version history
This function was introduced in Quick PDF Library version 7.19.
Description
Use this function to activate an alternative printing system that allows the printer status to be returned. Many of the status codes returned are supplied by the printer driver there is no guarantee that values will contain meaningful information for all printers.
The first step is to call this function with StatusCommand=101 to enable printer status monitoring. Optionally, the print job can be started in the paused state by calling this function again with StatusCommand=103. This might be necessary for small print jobs that would otherwise finish before the status can be read.
The print job can then be started as usual with one of the printing functions: PrintDocument, PrintDocumentToFile or PrintDocumentToPrinterObject.
Once the print job has started, this function can be called again repeatedly to obtain the printer status for the print job over time. If the print job was started in the paused state, actual printing will only begin once this function is called with StatusCommand=402.
Syntax
Delphi
function TDebenuPDFLibrary1811.RequestPrinterStatus(StatusCommand: Integer): Integer;
ActiveX
Function DebenuPDFLibrary1811.PDFLibrary::RequestPrinterStatus(
StatusCommand As Long) As Long
DLL
int DPLRequestPrinterStatus(int InstanceID, int StatusCommand)
Parameters
StatusCommand |
100 = Turn off printer status monitoring. 101 = Turn on printer status monitoring. 102 = Returns 1 if printer status monitoring is active. 103 = Start print job in paused state. 104 = Start printing immediately. 105 = Returns 1 if print job will be started in paused state. 200 = Returns 1 if print job data exists. 201 = Returns the Windows Spooler JobID. 202 = Returns the job priority, from 1 to 99. 203 = Returns the job's position in the print queue. 204 = Returns the total page count. 205 = Returns the number of pages that have been printed. This is usually zero if the data type is "RAW". 206 = Returns the number of milliseconds since the print job was started. 207 = Returns the print job data type Returns 1 if the data type contains "RAW" Returns 2 if the data type contains "EMF" Returns 3 if the data type contains "TEXT" Returns 4 if the data type contains "XPS" 300 = Returns the encoded job status. 301 = Returns 1 if the job is paused. 302 = Returns 1 if there is an error. 303 = Returns 1 if the job is being deleted. 304 = Returns 1 if the job is spooling. 305 = Returns 1 if the job is printing. 306 = Returns 1 if the printer is offline. 307 = Returns 1 if the printer is out of paper. 308 = Returns 1 if the job has printed. 309 = Returns 1 if the job has been deleted. 310 = Returns 1 if the driver cannot print the print job. 311 = Returns 1 if the printer has an error that requires the user to do something. 312 = Returns 1 if the job has been restarted. 313 = For Windows XP and later, returns 1 if the job has been sent to the printer (job may not be printed yet). 314 = For Windows Vista and later, returns 1 if the job has been retained in the print queue and cannot be deleted. 401 = Pause the print job. 402 = Resume a paused print job. 403 = Delete the print job. |