[Overview][Types][Classes][Variables][Index] | Reference for unit 'Printers' (#lcl)

# TPrinter.NewPage

Creates a new page for the current document.

## Declaration

Source position: printers.pas line 314

`public procedure TPrinter.NewPage;`

## Description

NewPage is a procedure used to create a new page for the document currently printing on the selected device.

NewPage checks the current class instance to see if it is a TPrinter descendant with an overridden DoNewPage method. If it has not been overridden, the following methods are called:

- EndPage
- BeginPage

When it has been overridden, the following actions are performed:

- Call CheckPrinting to ensure that Printing is True.
- Increment the value in PageNumber.
- Call the NewPage method in Canvas when RawMode is False.
- Call DoNewPage to execute the code for the class implementation.

## See also

TPrinter.PageNumber |  | Current page number in the document being printed to the device.
TPrinter.Canvas |  | The Canvas to be used for laying out the current document ready for printing.
TPrinter.RawMode |  | Indicates if raw output is used for the device (as opposed to a page description language).
TPrinter.BeginPage |  | Begins a page on the print device.
TPrinter.EndPage |  | Ends the current page for the document.