PrtNewPage

PrtNewPage signals the beginning of a new output page. This function call is issued for the first page in a job with page number 1, to signal to the spooler that the printer driver can determine print job page boundaries. This call also sets the ulPagesSent field in PRJINFO4 for the print job. See Data Types for a description of the PRJINFO4 data structure.

Syntax
PrtNewPage(hDevice, ulPageNumber);

Parameters

 * hDevice (HFILE) - input
 * The device handle returned by PrtOpen.


 * ulPageNumber (ULONG) - input
 * The new page number.

Return Code

 * rc (ULONG) - returns
 * Return codes.


 * 0
 * Success


 * 6(ERROR_INVALID_HANDLE)
 * Invalid handle given.

Remarks
PrtNewPage might not be issued for raw jobs. Some printer drivers might not be able to determine page breaks for raw print jobs.

Example Code



 * 1) define INCL_SPL
 * 2) define INCL_SPLDOSPRINT
 * 3) include 

HFILE   hDevice;       /*  The device handle returned by PrtOpen. */ ULONG   ulPageNumber;  /*  The new page number. */ ULONG   rc;            /*  Return codes. */

rc = PrtNewPage(hDevice, ulPageNumber); 