Before print processing actually starts, it is recommended that an application's modal dialog be displayed, showing page progress and enabling the user to cancel the print job. If the user presses Cancel on this dialog, the application must call DevEscape with the parameter DEVESC_ABORTDOC. This allows the spooler and printer driver to clean up. A job is not created in the queue.
Usually the output on a page is generated by a series of GPI calls from the application. By calculating the size of character strings or graphics written to the presentation space, the application must be able to decide when to move to the next page in a multi-page document.