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

# TPrinter.DoBeginDoc

Performs actions needed when printing is started for a document.

## Declaration

Source position: printers.pas line 265

`protected procedure TPrinter.DoBeginDoc; virtual;`

## Description

DoBeginDoc is a virtual procedure which performs actions needed when printing is started for a document. DoBeginDoc is called from the BeginDoc method, and occurs after checking the printer status and updating values in PrinterFlags. When RawMode is False, the Canvas has already been refreshed and its BeginDoc method has been called.

Remark: | In TPrinter, DoBeginDoc has an empty implementation. It must be overridden in a descendent class to perform actions needed for the operating system / widgetset / printer-related technology used in the implementation.

## See also

TPrinter.Printing |  | True if the document is currently being printed.
TPrinter.PrinterFlags |  | Status flags currently enabled for the print 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.Refresh |  | Refreshes the printer list, fonts, and current device selection.
TPrinterCanvas.BeginDoc |  | Performs actions needed to start printing a document.