PDFOptions¶
Options for converting HTML to PDF with Files.AddPDF.
Remarks¶
Margins, page sizes and spacings are in millimeters. Set PDFOptions.PageSize for a standard paper size, or PDFOptions.PageWidth and PDFOptions.PageHeight for a custom size. Header and footer HTML can contain the [page] and [topage] placeholders, and other properties of the options fill [name] placeholders.
Capabilities¶
Layout Options¶
- PDFOptions.FooterHtml: Gets or sets the HTML content to use as the footer on all pages in the document.
- PDFOptions.FooterSpacing: Gets or sets the space between the footer and the page content, in millimeters. The default is 0.
- PDFOptions.HeaderHtml: Gets or sets the HTML content to use as the header on all pages in the document.
- PDFOptions.HeaderSpacing: Gets or sets the space between the header and the page content, in millimeters. The default is 0.
- PDFOptions.MarginBottom: Gets or sets the bottom margin of the page, in millimeters. The default is 20.
- PDFOptions.MarginLeft: Gets or sets the left margin of the page, in millimeters. The default is 15.
- PDFOptions.MarginRight: Gets or sets the right margin of the page, in millimeters. The default is 15.
- PDFOptions.MarginTop: Gets or sets the top margin of the page, in millimeters. The default is 20.
- PDFOptions.Orientation: Gets or sets the page orientation.
- PDFOptions.PageHeight: Gets or sets the page height, in millimeters. Use together with
PageWidthfor a custom page size. - PDFOptions.PageSize: Gets or sets the predefined page size. The default is 'A4'.
- PDFOptions.PageWidth: Gets or sets the page width, in millimeters. Use together with
PageHeightfor a custom page size. - PDFOptions.Style: Gets or sets the CSS style to include in the page.