Contents

drawPage(at:in:)

Draws a page of content for the printer.

Declaration

func drawPage(at pageIndex: Int, in printableRect: CGRect)

Parameters

  • pageIndex:

    The index of the page to draw.

  • printableRect:

    The rectangle in which to draw printable content.

Discussion

The default implementation of this method calls, in sequence, drawHeaderForPage(at:in:), drawContentForPage(at:in:), drawPrintFormatter(_:forPageAt:), and drawFooterForPage(at:in:). Override this method to draw the specified page of content for the printer.

The system configures this method for drawing to the current graphics context according to UIGraphicsGetCurrentContext().

See Also

Drawing a page