In most cases, printer drivers are not responsible for sending bytes directly to the output port. Instead, printer drivers call special GDI functions to carry out the output. Depending on the options selected by the user, those functions will route the output to a specific port, to a disk file, across a network connection, or to a temporary file for later output by Print Manager.
GDI contains functions a device driver can call to perform output. The driver does not need to know if output is being queued or written directly to the port. The following lists these functions, and provides a brief description of each.
Function | Description |
CloseJob | Closes a print job, and enables it for printing. |
DeleteJob | Deletes a open job, removing it from the print queue. |
EndSpoolPage | Marks the end of a spooled page. |
OpenJob | Opens a print job, returning a handle that the driver can use to write output to the job. |
StartSpoolPage | Marks the start of a spooled page. Print Manager manages print jobs by printing one spooled page at a time. |
WriteDialog | Displays a dialog box directing the user to carry out some action to permit printing to continue. |
WriteSpool | Writes data to an open print job. |