Contents

printingItem

A single ready-to-print object.

Declaration

var printingItem: Any? { get set }

Discussion

The object must be an instance of the NSURL, NSData, or UIImage class. An object of the first two types must reference or contain image data or PDF data. NSURL objects must use the file: or any scheme that can return an NSData object with a registered protocol. Image data (including that encapsulated by UIImage) must be in a format supported by the Image I/O framework; see UIImage for more information. The object is released at the end of the print job. The default value is nil.

If you set this property, UIPrintInteractionController sets the printingItems, printPageRenderer, and printFormatter properties to nil. (You can only set one of these properties for a print job).

If this property is set and the showsPageRange property is set to true—and the printing item is a PDF document of more than one page—the printing options include the control for selecting a page range.

See Also

Providing the source of printable content