Contents

PMPageFormatGetPrinterID(_:_:)

Obtains the identifier of the formatting printer for a page format object.

Declaration

func PMPageFormatGetPrinterID(_ pageFormat: PMPageFormat, _ printerID: UnsafeMutablePointer<Unmanaged<CFString>?>) -> OSStatus

Parameters

  • pageFormat:

    The page format object whose printer identifier you want to obtain.

  • printerID:

    A pointer to your Cfstring variable. On return, the variable refers to a Core Foundation string that contains the identifier of the formatting printer for the specified page format object. If the page format object does not have that information, the variable is set to NULL. You should not release the string without first retaining it.

Return Value

A result code. See Result Codes.

Discussion

Page format objects can be created a number of different ways and some of them do not require a specific printer. If the printer ID is known, the printer is displayed in the Page Setup dialog’s Format for pop-up menu. If the printer ID is not known, the default formatting printer is the generic Any Printer. The printing system provides default page and paper sizes for the generic printer.

See Also

Accessing Data in Page Format Objects