Contents

PMSetFirstPage(_:_:_:)

Sets the default page number of the first page to be printed.

Declaration

func PMSetFirstPage(_ printSettings: PMPrintSettings, _ first: UInt32, _ lock: Bool) -> OSStatus

Parameters

  • printSettings:

    The print settings object whose first page number you want to set.

  • first:

    The page number of the first page to print. This value appears in the From field of the Print dialog.

  • lock:

    The lock state of the setting. Locking is not supported at this time.

Return Value

A result code. See Result Codes.

Discussion

Typically, this function isn’t used. In macOS, if you call the function PMSetPageRange(_:_:_:) and then call PMSetFirstPage or PMSetLastPage using the same page range you specified for PMSetPageRange, then the Print dialog shows the From button selected. If you use the constant kPMPrintAllPages to set the page range with the function PMSetPageRange, then the Print dialog opens with the All button selected regardless of whether you also call PMSetFirstPage or PMSetLastPage.

If you call this function after initiating a print job, the change is ignored for the current job.

See Also

Accessing Data in Print Settings Objects