PrintDocumentOnPrintProcessor function (winsplp.h)
A print processor's PrintDocumentOnPrintProcessor
function converts a print job from a spooled format into raw data that can be sent to a print monitor.
Syntax
BOOL PrintDocumentOnPrintProcessor(
[in] HANDLE hPrintProcessor,
[in] LPWSTR pDocumentName
);
Parameters
[in] hPrintProcessor
Caller-supplied print processor handle. This is the handle returned by a previous call to OpenPrintProcessor.
[in] pDocumentName
Caller-supplied pointer to the document name.
Return value
If the operation succeeds, the function should return TRUE. If the operation fails, the function should call SetLastError to set an error code, and then return FALSE.
Remarks
Print processors are required to export a PrintDocumentOnPrintProcessor
function. The spooler calls the function after calling OpenPrintProcessor. The function's purpose is to read the contents of the file named by pDocumentName, convert (if necessary) the file's data to a data stream that can be read by printer hardware, and to send the data stream back to the spooler. The spooler can then send the data stream to the appropriate print monitor.
If the input format is NT-based operating system EMF, the PrintDocumentOnPrintProcessor
function can call GDI functions for print processors. For more information, see Processing a Print Job.
The converted data stream must be sent back to the spooler by calling WritePrinter, which is described in the Microsoft Windows SDK documentation. For more information, see Processing a Print Job.
The PrintDocumentOnPrintProcessor
function must be written to handle requests to pause, resume, or cancel the print job. For more information, see ControlPrintProcessor.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | winsplp.h (include Winsplp.h) |
Library | Nwprint.lib |