TPrinter.BeginDoc procedure
Starts printing for the current document.
Declaration
procedure BeginDocDescription
BeginDoc is a procedure used to start printing for the current
document. BeginDoc calls
CheckPrinting to ensure that the print
device has not already started printing for the document. CheckPrinting
raises an exception if the value in
Printing is
True.
BeginDoc calls SelectCurrentPrinterOrDefault to ensure a valid
printer is selected for the class instance. If the current selection is
invalid, the "default" printer is selected. The default printer is the first
one in Printers.
BeginDoc updates PrinterFlags to include the value
pfPrinting, and removes the value pfAborted (if
present). The PageNumber property is reset for the newly started
printing operation.
BeginDoc uses the value in RawMode to determine if a printer
canvas is in used for the class instance. When RawMode is False, a
TPrinterCanvas instance exists in Canvas. Its
Refresh method is called, and the BeginDoc method in
the printer canvas is called to synchronize the canvas. The value in
YDPI is assigned to the PPI (Pixels per Inch) setting for the
canvas font. No actions are performed for the printer canvas when RawMode is
True.
BeginDoc calls the DoBeginDoc method to perform any actions
specific to the current class implementation. BeginPage is called
to increment the PageNumber for the print device.
Use EndDoc to finish printing for the current document.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
