Printers

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Printers

Printer management class THtPrinter is located in units htprintes for VCL and fmx.htprinters for FMX (Windows and MacOS are supported).

 

Class methods:

 

ListPapers: THtPapers - list all supported paper sizes.

     THtPaper = record
       ID: NativeInt;
       Name: string;
       SizeMM: TPointF;
     end;

 

SetPaperSize(APaperID: integer) - set paper size by ID

 

SetCustomPaperSize(const AWidthMM, AHeightMM: single) - set custom paper size. Check SupportsCustomPaperSize before using it.

 

HasPaperSize(const AWidthMM, AHeightMM: single; out APaperID: NativeInt;

     out AWidth, AHeight: single; const EpsilonMM: single = 1): boolean   - check if printer has paper size.

 

SupportsCustomPaperSize: boolean - check if printer supports custom paper size.

 

Reset - reset printer settings to default.

 

ListBins(ABins: TStrings) - get list of printer bins.

 

SelectBin(ABinID: integer) - select bin.

 

GetPageMarginsMM: TRectF - get non-printable margins.