Instance Method

printInteractionController(_:choosePaper:)

Asks the delegate for an object encapsulating the paper size and printing area to use for the print job.

Declaration

optional func printInteractionController(_ printInteractionController: UIPrintInteractionController, choosePaper paperList: [UIPrintPaper]) -> UIPrintPaper

Parameters

printInteractionController

The shared instance of UIPrintInteractionController that is managing the print job.

paperList

An array of UIPrintPaper objects that represent combinations of paper sizes and imageable areas supported by the selected printer.

Return Value

A UIPrintPaper object representing both the paper size and imageable area (or printable rectangle) to use for the print job.

Discussion

This method is intended for apps (typically document-based apps) that have a notion of distinct paper sizes. The delegate can examine the objects in paperList to locate the paper size and printable rectangle combination that is best suited for its needs and return the encapsulating UIPrintPaper object. Or it can call the bestPaper(forPageSize:withPapersFrom:) class method of the UIPrintPaper class, passing in a specific page size (typically the document size), and return the object returned by that method.

See Also

Choosing a Paper Size for the Print Job