# Class TPDFPrintOptions

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFPDFPrintOptions

## Declaration

`type TPDFPrintOptions = class(TObject)`

## Description

The TPDFPrintOptions properties are used to fill the TCefPdfPrintSettings record which is used in the TChromiumCore.PrintToPDF call.

## Hierarchy

- TObject
- TPDFPrintOptions

## Overview

### Fields

| `FLandscape: boolean;`
| `FPrintBackground: boolean;`
| `FScale: double;`
| `FPaperWidth: double;`
| `FPaperHeight: double;`
| `FPreferCSSPageSize: boolean;`
| `FMarginType: TCefPdfPrintMarginType;`
| `FMarginTop: double;`
| `FMarginRight: double;`
| `FMarginBottom: double;`
| `FMarginLeft: double;`
| `FPageRanges: ustring;`
| `FDisplayHeaderFooter: boolean;`
| `FHeaderTemplate: ustring;`
| `FFooterTemplate: ustring;`
| `FGenerateTaggedPDF: boolean;`
| `FGenerateDocumentOutline: boolean;`

### Methods

| `function GetScalePct: double;`
| `function GetPaperWidthMM: double;`
| `function GetPaperHeightMM: double;`
| `function GetMarginTopMM: double;`
| `function GetMarginRightMM: double;`
| `function GetMarginBottomMM: double;`
| `function GetMarginLeftMM: double;`
| `procedure SetScalePct(const aValue: double);`
| `procedure SetPaperWidthMM(const aValue: double);`
| `procedure SetPaperHeightMM(const aValue: double);`
| `procedure SetMarginTopMM(const aValue: double);`
| `procedure SetMarginRightMM(const aValue: double);`
| `procedure SetMarginBottomMM(const aValue: double);`
| `procedure SetMarginLeftMM(const aValue: double);`
| `function InchesToMM(const aInches: double): double;`
| `function MMToInches(const aMM: double): double;`
| `constructor Create; virtual;`
| `procedure CopyToSettings(var aSettings : TCefPdfPrintSettings);`

### Properties

| `property Landscape : boolean read FLandscape write FLandscape;`
| `property PrintBackground : boolean read FPrintBackground write FPrintBackground;`
| `property PreferCSSPageSize : boolean read FPreferCSSPageSize write FPreferCSSPageSize;`
| `property PageRanges : ustring read FPageRanges write FPageRanges;`
| `property DisplayHeaderFooter : boolean read FDisplayHeaderFooter write FDisplayHeaderFooter;`
| `property HeaderTemplate : ustring read FHeaderTemplate write FHeaderTemplate;`
| `property FooterTemplate : ustring read FFooterTemplate write FFooterTemplate;`
| `property GenerateTaggedPDF : boolean read FGenerateTaggedPDF write FGenerateTaggedPDF;`
| `property GenerateDocumentOutline : boolean read FGenerateDocumentOutline write FGenerateDocumentOutline;`
| `property Scale : double read FScale write FScale;`
| `property ScalePct : double read GetScalePct write SetScalePct;`
| `property PaperWidthInch : double read FPaperWidth write FPaperWidth;`
| `property PaperHeightInch : double read FPaperHeight write FPaperHeight;`
| `property PaperWidthMM : double read GetPaperWidthMM write SetPaperWidthMM;`
| `property PaperHeightMM : double read GetPaperHeightMM write SetPaperHeightMM;`
| `property MarginType : TCefPdfPrintMarginType read FMarginType write FMarginType;`
| `property MarginTopInch : double read FMarginTop write FMarginTop;`
| `property MarginRightInch : double read FMarginRight write FMarginRight;`
| `property MarginBottomInch : double read FMarginBottom write FMarginBottom;`
| `property MarginLeftInch : double read FMarginLeft write FMarginLeft;`
| `property MarginTopMM : double read GetMarginTopMM write SetMarginTopMM;`
| `property MarginRightMM : double read GetMarginRightMM write SetMarginRightMM;`
| `property MarginBottomMM : double read GetMarginBottomMM write SetMarginBottomMM;`
| `property MarginLeftMM : double read GetMarginLeftMM write SetMarginLeftMM;`

## Description

### Fields

| `FLandscape: boolean;`
This item has no description.

| `FPrintBackground: boolean;`
This item has no description.

| `FScale: double;`
This item has no description.

| `FPaperWidth: double;`
This item has no description.

| `FPaperHeight: double;`
This item has no description.

| `FPreferCSSPageSize: boolean;`
This item has no description.

| `FMarginType: TCefPdfPrintMarginType;`
This item has no description.

| `FMarginTop: double;`
This item has no description.

| `FMarginRight: double;`
This item has no description.

| `FMarginBottom: double;`
This item has no description.

| `FMarginLeft: double;`
This item has no description.

| `FPageRanges: ustring;`
This item has no description.

| `FDisplayHeaderFooter: boolean;`
This item has no description.

| `FHeaderTemplate: ustring;`
This item has no description.

| `FFooterTemplate: ustring;`
This item has no description.

| `FGenerateTaggedPDF: boolean;`
This item has no description.

| `FGenerateDocumentOutline: boolean;`
This item has no description.

### Methods

| `function GetScalePct: double;`
This item has no description.

| `function GetPaperWidthMM: double;`
This item has no description.

| `function GetPaperHeightMM: double;`
This item has no description.

| `function GetMarginTopMM: double;`
This item has no description.

| `function GetMarginRightMM: double;`
This item has no description.

| `function GetMarginBottomMM: double;`
This item has no description.

| `function GetMarginLeftMM: double;`
This item has no description.

| `procedure SetScalePct(const aValue: double);`
This item has no description.

| `procedure SetPaperWidthMM(const aValue: double);`
This item has no description.

| `procedure SetPaperHeightMM(const aValue: double);`
This item has no description.

| `procedure SetMarginTopMM(const aValue: double);`
This item has no description.

| `procedure SetMarginRightMM(const aValue: double);`
This item has no description.

| `procedure SetMarginBottomMM(const aValue: double);`
This item has no description.

| `procedure SetMarginLeftMM(const aValue: double);`
This item has no description.

| `function InchesToMM(const aInches: double): double;`
This item has no description.

| `function MMToInches(const aMM: double): double;`
This item has no description.

| `constructor Create; virtual;`
Constructor of TPDFPrintOptions

| `procedure CopyToSettings(var aSettings : TCefPdfPrintSettings);`
Copy the fields of this class to the TCefPdfPrintSettings parameter.

### Properties

| `property Landscape : boolean read FLandscape write FLandscape;`
Set to true for landscape mode or false for portrait mode.

| `property PrintBackground : boolean read FPrintBackground write FPrintBackground;`
Set to true to print background graphics.

| `property PreferCSSPageSize : boolean read FPreferCSSPageSize write FPreferCSSPageSize;`
Set to true to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.

| `property PageRanges : ustring read FPageRanges write FPageRanges;`

Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed.

The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end.

| `property DisplayHeaderFooter : boolean read FDisplayHeaderFooter write FDisplayHeaderFooter;`
Set to true to display the header and/or footer. Modify HeaderTemplate and/or FooterTemplate to customize the display.

| `property HeaderTemplate : ustring read FHeaderTemplate write FHeaderTemplate;`

HTML template for the print header. Only displayed if DisplayHeaderFooter is true. Should be valid HTML markup with the following classes used to inject printing values into them:

    - date: formatted print date
    - title: document title
    - url: document location
    - pageNumber: current page number
    - totalPages: total pages in the document

For example, "<span class=title></span>" would generate a span containing the title.

| `property FooterTemplate : ustring read FFooterTemplate write FFooterTemplate;`
HTML template for the print footer. Only displayed if DisplayHeaderFooter is true. Uses the same format as HeaderTemplate.

| `property GenerateTaggedPDF : boolean read FGenerateTaggedPDF write FGenerateTaggedPDF;`
Set to true to generate tagged (accessible) PDF.

| `property GenerateDocumentOutline : boolean read FGenerateDocumentOutline write FGenerateDocumentOutline;`
Set to true to generate a document outline.

| `property Scale : double read FScale write FScale;`
The percentage to scale the PDF by before printing (e.g. .5 is 50%). If this value is less than or equal to zero the default value of 1.0 will be used.

| `property ScalePct : double read GetScalePct write SetScalePct;`
The percentage value to scale the PDF by before printing (e.g. 50 is 50%).

| `property PaperWidthInch : double read FPaperWidth write FPaperWidth;`
Output paper width in inches. If either of these values is less than or equal to zero then the default paper size (letter, 8.5 x 11 inches) will be used.

| `property PaperHeightInch : double read FPaperHeight write FPaperHeight;`
Output paper height in inches. If either of these values is less than or equal to zero then the default paper size (letter, 8.5 x 11 inches) will be used.

| `property PaperWidthMM : double read GetPaperWidthMM write SetPaperWidthMM;`
Output paper width in mm.

| `property PaperHeightMM : double read GetPaperHeightMM write SetPaperHeightMM;`
Output paper height in mm.

| `property MarginType : TCefPdfPrintMarginType read FMarginType write FMarginType;`
Margin type.

| `property MarginTopInch : double read FMarginTop write FMarginTop;`
Top margin in inches. Only used if MarginType is set to PDF_PRINT_MARGIN_CUSTOM.

| `property MarginRightInch : double read FMarginRight write FMarginRight;`
Right margin in inches. Only used if MarginType is set to PDF_PRINT_MARGIN_CUSTOM.

| `property MarginBottomInch : double read FMarginBottom write FMarginBottom;`
Bottom margin in inches. Only used if MarginType is set to PDF_PRINT_MARGIN_CUSTOM.

| `property MarginLeftInch : double read FMarginLeft write FMarginLeft;`
Left margin in inches. Only used if MarginType is set to PDF_PRINT_MARGIN_CUSTOM.

| `property MarginTopMM : double read GetMarginTopMM write SetMarginTopMM;`
Top margin in mm.

| `property MarginRightMM : double read GetMarginRightMM write SetMarginRightMM;`
Right margin in mm.

| `property MarginBottomMM : double read GetMarginBottomMM write SetMarginBottomMM;`
Bottom margin in mm.

| `property MarginLeftMM : double read GetMarginLeftMM write SetMarginLeftMM;`
Left margin in mm.

Generated by PasDoc 0.17.0.snapshot.