The size of paper used for a print job and the rectangle in which content can be printed.
SDKs
- iOS 4.2+
- Mac Catalyst 13.0+
Framework
- UIKit
Declaration
class UIPrintPaper : NSObject
Overview
In most cases, UIKit automatically creates an instance of UIPrint
that is appropriate for a print job. The UIKit framework has default paper sizes based on a print job’s output type (output
is a property of the UIPrint
class). If the output type is UIPrint
, the default paper size is 4x6 or A6 or some other standard size, depending on locale; if the output type is UIPrint
or UIPrint
, the default paper size is US Letter (8 1/2 by 11 inches) or A4 or some other standard size, depending on locale.
Applications may have special requirements for paper sizes. For example, a word-processing application may have items of “stationery” in which printable content must be drawn. If your application fits the special case, the delegate of UIPrint
can implement the print
method of the UIPrint
protocol to return a suitable print paper object. One way to do this is to call the best
class method of UIPrint
, passing in a array of print paper objects representing the paper sizes supported by a printer. The print paper object returned from this method represents the paper size best matched to the size requirement of the application.
The printable rectangle (printable
) is the imageable area for the printer on a paper of a given size.
If you are using a UIPrint
object to draw the content for printing, the rectangle stored in the printable
property is stored in the page renderer’s property of the same name and the paper size used for a print job is stored as part of the paper
property.