Contents

PMGetAdjustedPaperRect(_:_:)

Obtains the rectangle defining the paper size, taking into account orientation, application drawing resolution, and scaling settings.

Declaration

func PMGetAdjustedPaperRect(_ pageFormat: PMPageFormat, _ paperRect: UnsafeMutablePointer<PMRect>) -> OSStatus

Parameters

  • pageFormat:

    The page format object whose adjusted paper rectangle you want to obtain.

  • paperRect:

    A pointer to your Pmrect structure. On return, the structure describes the current paper size, in points, taking into account scaling, rotation, and application resolution settings. The coordinates of the upper-left corner of the paper rectangle are specified relative to the page rectangle. The coordinates of the upper-left corner of the page rectangle are always (0,0), which means the coordinates of the upper-left corner of the paper rectangle are always negative or (0,0). See Supporting Printing in Your Carbon Application for more information on page and paper rectangles.

Return Value

A result code. See Result Codes.

Discussion

Before using this function, you must call the function PMSessionValidatePageFormat(_:_:_:) to ensure that the values for the adjusted paper rectangle correctly account for scaling, rotation, and application resolution settings.

See Also

Accessing Data in Page Format Objects