PMPaperCreateCustom(_:_:_:_:_:_:_:)
Creates a custom paper object.
Declaration
func PMPaperCreateCustom(_ printer: PMPrinter?, _ id: CFString?, _ name: CFString?, _ width: Double, _ height: Double, _ margins: UnsafePointer<PMPaperMargins>, _ paperP: UnsafeMutablePointer<PMPaper?>) -> OSStatusParameters
- printer:
A printer for which the specified paper size is appropriate.
- id:
A unique identifier for this custom paper. For example, you could create a UUID string and use it as the unique identifier.
- name:
The name to display to the user for this custom paper.
- width:
The width of the paper, in points.
- height:
The height of the paper, in points.
- margins:
A pointer to a Pmpapermargins structure that specifies the unprintable margins of the paper, in points. The four values in the structure specify the top, left, bottom, and right imageable area margins of the paper.
- paperP:
A pointer to your Pmpaper variable. On return, the variable refers to a new custom paper object. You are responsible for releasing the paper object with the function 1461402 Pmrelease.
Return Value
A result code. See Result Codes.
Discussion
This function creates a custom paper object appropriate for the specified printer. Custom papers are treated differently than built-in papers by the printing system. To obtain one of the available built-in papers for a given printer, you can use the function PMPrinterGetPaperList(_:_:).