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

TPrinterCanvas.TopMargin

The size of the margin at the top of the canvas.

Declaration

Source position: printers.pas line 129

public property TPrinterCanvas.TopMargin : Integer
  read GetTopMargin
  write FTopMargin;

Description

TopMargin is an Integer property which contains the size for the area between the edge of the paper and the top of the content on the page. Margin values are expressed as the number of "Dots" for the native printer resolution (YDPI). To achieve a .5in margin on a 300DPI laser printer, use the value 150.

The value for the property is normally provided by the Printer using the canvas to render document pages. When the property contains 0 (zero) and the Printer is assigned, its PaperRect property is examined to get the Top of the printable area for the paper size. Otherwise, the existing value in the property is used.

Changes to the property value are not applied to the Printer device.

Use BottomMargin for the unused area at the bottom edge of the canvas. Values in TopMargin, BottomMargin, and PaperHeight are used to calculate the PageHeight for the printer canvas.

See also

TPrinterCanvas.Printer

  

Device which uses the canvas to print a document.

TPrinterCanvas.BottomMargin

  

The size of the margin at the bottom edge of the canvas.

TPrinterCanvas.PaperHeight

  

Vertical size for the paper selected in the print device.

TPrinterCanvas.PageHeight

  

Size of the printable area for the page on the vertical axis.

TPrinterCanvas.YDPI

  

DPI (Dots per Inch) in the vertical direction for the print device.

TPrinter.YDPI

  

Number of DPI (Dots per Inch) on the vertical axis for the selected device.

TPaperRect

  

Holds the physical and working dimensions for a paper size.


Version 4.0 Generated 2025-05-03 Home