[Overview][Types][Classes][Variables][Index] |
Starts printing for the current document.
Source position: printers.pas line 312
public procedure TPrinter.BeginDoc; |
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.
|
Indicates if raw output is used for the device (as opposed to a page description language). |
|
|
True if the document is currently being printed. |
|
|
Status flags currently enabled for the print device. |
|
|
The Canvas to be used for laying out the current document ready for printing. |
|
|
Selects the default printer when a printer has not been selected. |
|
|
Contains the ordinal position in Printers for the selected print device. |
|
|
Current page number in the document being printed to the device. |
|
|
Begins a page on the print device. |
|
|
Makes the device with the specified name the current printer. |
|
|
Ends printing for the current document. |
|
|
Implements a canvas used for TPrinter device output. |
Version 3.2 | Generated 2024-02-25 | Home |