Jump to content

SplQmNewPage

From EDM2
Revision as of 20:18, 2 July 2023 by Ak120 (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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);