Contents

PMSessionGetDocumentFormatGeneration

Obtains the spool file formats that can be generated for the specified printing session.

Declaration

OSStatus PMSessionGetDocumentFormatGeneration (
   PMPrintSession printSession,
   CFArrayRef *docFormats
);

Parameters

  • printSession:

    The printing session whose spool file formats you want to obtain.

  • docFormats:

    A pointer to your Cfarray variable. On return, the variable refers to a Core Foundation array that contains the MIME types for the available spool file formats. Each element in the array is a Core Foundation string. Despite what its name implies, the function PMSessionGetDocumentFormatGeneration has Create/Copy semantics which means you are responsible for releasing the array.

Return Value

A result code. See Result Codes.

Overview

You must call the function PMSessionGetDocumentFormatGeneration between the creation and release of a printing session. See the function PMCreateSession. You should call PMSessionGetDocumentFormatGeneration only after the Print dialog is dismissed.

The function PMSessionGetDocumentFormatGeneration determines the spool file formats that the specific print job supports. Spool file formats are represented by MIME types. The macOS print spooler supports PDF and PICT + PS. The default spool file format is PDF. PICT + PS is supported only for printing to a PostScript printer.

Special Considerations

The PICT + PS spool file format is not available on Intel-based systems.

See Also

Accessing Data in Printing Session Objects