|
Page size and margins
TPrintJob allows to set any page size using the PageHeight and PageWidth. By default (if the PageMode property is pmDefault) these properties contain the page size currently selected on the default printer. The page size can be present in pixels, inches, millimeters and percents from the default page size. The units can be selected by the PageUnints property. To set the custom page size just set the PageMode property to pmCustom and set the needed PageWidth and PageHeight. Please note that neverless you can set the size larger than maximal page size of the selected printer, the printer will truncate your output by the real paper size.
You can use margins (see the Margins, MarginsUnits property and joMargins flag in the Options property). If the entered margins are less than the non-printable margins of the selected printers, TPrintJob check the MarginsError property value to react:
-
| meNone | no reaction |
| meMessageBox | the error message is displayed |
| meException | EPrintJob exception is raised |
| meAutoFix | the margins are corrected automatically |
By default the MarginsError property is meAutoFix, so the margins contain the minimal margin allowed by the selected printer.
|