# 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

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

### Methods

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

### Properties

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

## Description

### Fields

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

### Methods

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Public | `constructor Create; virtual;`
Constructor of TPDFPrintOptions

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

### Properties

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

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

Public | `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.

Public | `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.

Public | `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.

Public | `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.

Public | `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.

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

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

Public | `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.

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

Public | `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.

Public | `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.

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

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

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

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

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

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

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

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

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

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

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

Generated by PasDoc 1.0.4.