Contents

PMPrinterGetID(_:)

Returns the unique identifier of a printer.

Declaration

func PMPrinterGetID(_ printer: PMPrinter) -> Unmanaged<CFString>?

Parameters

  • printer:

    The printer whose identifier you want to obtain.

Return Value

The identifier of the specified printer. You should not release the string without first retaining it. If the specified printer is not valid, this function returns NULL.

Discussion

You can use the function PMPrinterGetID to capture information about a printer for later use. To create a printer object from a printer ID returned by this function, use the function PMPrinterCreateFromPrinterID(_:).

See Also

Accessing Information About a Printer