Jump to content

SplQmNewPage: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This function notifies the spooler of a page boundary when spooling a print job. It is called by the Presentation driver just prior to the first SplQmWrite for a page, including before the first page of the print job being spooled.  
This function notifies the spooler of a page boundary when spooling a print job. It is called by the Presentation driver just prior to the first SplQmWrite for a page, including before the first page of the print job being spooled.


SplQmNewPage allows prespool approximation of the length of print jobs and may be used to alter job scheduling. The function may be called once, when the entire metafile is spooled, with the total number of pages for the print job.  
SplQmNewPage allows prespool approximation of the length of print jobs and may be used to alter job scheduling. The function may be called once, when the entire metafile is spooled, with the total number of pages for the print job.


This call also sets ulPagesSpooled in PRJINFO4 for the print job. See PRJINFO4 in Data Types for details on this data structure.  
This call also sets ulPagesSpooled in PRJINFO4 for the print job. See PRJINFO4 in Data Types for details on this data structure.


==Syntax==
==Syntax==
  rc = SplQmNewPage(hspl, ulPageNumber);
  rc = SplQmNewPage(hspl, ulPageNumber)
 
==Parameters==
==Parameters==
; hspl (HSPL) - input  
; hspl (HSPL) - input: Spool file handle returned by SplQmOpen.
: Spool file handle returned by SplQmOpen.  
; ulPageNumber (ULONG) - input: Page number of next SplQmWrite.
 
The first page number would be 1 (one).
; ulPageNumber (ULONG) - input  
: Page number of next SplQmWrite.  
 
The first page number would be 1 (one).  


==Return Code==
==Return Code==
; rc (ULONG) - returns  
; rc (ULONG) - returns: Return codes.
: Return codes.  


* 0  
* 0 : Success
: Success  
* ERROR_INVALID_HANDLE(6) : Invalid handle given.
* ERROR_INVALID_HANDLE(6)  
: Invalid handle given.


==Example Code==
==Example Code==

Latest revision as of 20:18, 2 July 2023

This function notifies the spooler of a page boundary when spooling a print job. It is called by the Presentation driver just prior to the first SplQmWrite for a page, including before the first page of the print job being spooled.

SplQmNewPage allows prespool approximation of the length of print jobs and may be used to alter job scheduling. The function may be called once, when the entire metafile is spooled, with the total number of pages for the print job.

This call also sets ulPagesSpooled in PRJINFO4 for the print job. See PRJINFO4 in Data Types for details on this data structure.

Syntax

rc = SplQmNewPage(hspl, ulPageNumber)

Parameters

hspl (HSPL) - input
Spool file handle returned by SplQmOpen.
ulPageNumber (ULONG) - input
Page number of next SplQmWrite.

The first page number would be 1 (one).

Return Code

rc (ULONG) - returns
Return codes.
  • 0 : Success
  • ERROR_INVALID_HANDLE(6) : Invalid handle given.

Example Code

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

HSPL     hspl;          /*  Spool file handle returned by SplQmOpen. */
ULONG    ulPageNumber;  /*  Page number of next SplQmWrite. */
ULONG    rc;            /*  Return codes. */

rc = SplQmNewPage(hspl, ulPageNumber);