Contents

PMPrintSettingsToOptionsWithPrinterAndPageFormat(_:_:_:_:)

Converts print settings and page format data into a CUPS options string for a specified printer.

Declaration

func PMPrintSettingsToOptionsWithPrinterAndPageFormat(_ settings: PMPrintSettings, _ printer: PMPrinter, _ pageFormat: PMPageFormat?, _ options: UnsafeMutablePointer<UnsafeMutablePointer<CChar>?>) -> OSStatus

Parameters

  • settings:

    The print settings to convert.

  • printer:

    The printer to use for converting the print settings. This parameter must not be NULL.

  • pageFormat:

    The page format to convert, or NULL to specify default page format data.

  • options:

    A pointer to a C string. On return, a CUPS option string with the specified print settings and page format data, or NULL if the data could not be converted. The function allocates storage for the string. You are responsible for freeing the storage.

Return Value

A result code. See Result Codes.

Discussion

This function creates a CUPS options string for the destination printer that captures the data in the specified print settings and page format objects. For example, you could pass this string to the function PMWorkflowSubmitPDFWithOptions(_:_:_:_:) to submit a PDF file for workflow processing. You could also use the options string to run a CUPS filter directly.

See Also

Creating and Using Print Settings Objects