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

TPrinter.DoGetPaperRect

Performs actions needed to get the dimensions (rectangle) for the specified paper.

Declaration

Source position: printers.pas line 290

protected function TPrinter.DoGetPaperRect(

  aName: string;

  var aPaperRc: TPaperRect

):Integer; virtual;

Arguments

aName

  

Paper name to locate for the selected printer.

aPaperRc

  

Rectangle with the dimensions for the paper.

Function result

0 for margins, 1 for physical paper, -1 when not found.

Description

DoGetPaperRect is an Integer function used to get the dimensions (or rectangle) for the specified paper name. The return value indicates whether the rectangle represents the margins or the actual work area for the specified paper name.

0
aPaperRc is the margins for the specified paper name.
1
aPaperRc is the physical dimensions for the work area in the paper.
-1
A paper with the specified name was not found, or its dimension are not known.
Remark: In TPrinter, DoGetPaperRect always returns -1. It must be overridden in a descendant class to use the facilities for the printer type to get page areas.

See also

TPaperSize.SupportedPapers

  

The list of supported paper names for the attached printer device.


Version 3.2 Generated 2024-02-25 Home