Jump to content

PrtNewPage: Difference between revisions

From EDM2
Created page with "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 d..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
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.  
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==
==Syntax==
Line 5: Line 5:


==Parameters==
==Parameters==
; hDevice (HFILE) - input  
;hDevice (HFILE) - input: The device handle returned by [[PrtOpen]].
: The device handle returned by PrtOpen.  
;ulPageNumber (ULONG) - input: The new page number.
 
; ulPageNumber (ULONG) - input  
: The new page number.  


==Return Code==
==Return Code==
; rc (ULONG) - returns  
;rc (ULONG) - returns: Return codes.
: Return codes.  
*0 : Success
*6 (ERROR_INVALID_HANDLE) : Invalid handle given.


* 0
==Remarks==
: Success
PrtNewPage might not be issued for raw jobs. Some printer drivers might not be able to determine page breaks for raw print jobs.
*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==
<PRE>
<PRE>
#define INCL_SPL
#define INCL_SPL
#define INCL_SPLDOSPRINT
#define INCL_SPLDOSPRINT

Latest revision as of 22:34, 7 June 2020

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.

#define INCL_SPL
#define INCL_SPLDOSPRINT
#include <os2.h>

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

rc = PrtNewPage(hDevice, ulPageNumber);