Contents

printOperation(withSettings:)

Creates and returns a print operation for the document’s contents.

Declaration

func printOperation(withSettings printSettings: [NSPrintInfo.AttributeKey : Any]) throws -> NSPrintOperation

Parameters

  • printSettings:

    The print settings dictionary to use.

Return Value

The print operation, or nil if unsuccessful.

Discussion

The print operation can be run to print the document’s current contents. The NSPrintInfo attributes in the passed-in printSettings dictionary are added to a copy of the document’s print info, and the resulting print info is used for the operation.

See Also

Printing the Document