PdfDocumentControl Class

This class controls the properties of the PDF document generated by the HTML to PDF Converter. A reference to an object of this class is exposed by the Document property of the HtmlToPdf class

Definition

Namespace: HiQPdf.Chromium
Assembly: HiQPdf.Chromium (in HiQPdf.Chromium.dll) Version: 16.4.0
C#
public class PdfDocumentControl
Inheritance
Object    PdfDocumentControl

Constructors

PdfDocumentControl Constructs an object controlling the HTML to PDF conversion

Properties

AutoResizePdfPageWidth Controls if the PDF page width is automatically resized to match the BrowserWidth at 96 DPI resolution. The PDF page height is given by the PageSize property. The default value is true
DigitalSignature The digital signature to apply to generated PDF document
DisplayHeaderFooter Controls if the header and footer defined by the HeaderTemplateHtml and FooterTemplateHtml properties will be applied to PDF document. The default is false
FooterTemplate The PDF document footer template in HTML format. If the footer is null or empty a default template will be used. The HTML template should be valid HTML markup with following classes used to inject values: date: formatted print date, title: document title, url: document location, pageNumber: current page number, totalPages: total pages in the document. For example, would generate span containing the title
GenerateDocumentOutline Controls if the generated PDF document will have an outline with bookmarks create from HTML heading tags. The default is false
GenerateTableOfContents Controls if a table of contents is automatically created in the PDF document from HTML heading tags. The default is false
GenerateTaggedPdf Controls if the generated PDF document will be tagged for accessibility. The default is false
HeaderTemplate The PDF document header template in HTML format. If the template is null or empty a default template will be used. The HTML template should be valid HTML markup with following classes used to inject values: date: formatted print date, title: document title, url: document location, pageNumber: current page number, totalPages: total pages in the document. For example, would generate span containing the title
Margins The PDF document margins. By default all the margins are 0
MaxPageCount The maximum number of PDF pages to create. The default value is 0 to convert the entire HTML document to PDF
PageOrientation The PDF document pages orientation. The default orientation is potrait
PageSize The PDF document page size. The default value is A4
PreferCssPageSize A flag indicating if to prefer page size as defined by css. The default value is false and the HTML content will be scaled to fit the page size specified by PdfPageSize property
PrintBackgrounds Controls if background graphics are printted by HTML to PDF converter. The default is true.
Properties Controls the title, subject, keywords, author and the creation date of the PDF document
Security The object exposed by this property can be used to password protect the PDF document, disable printing, copying or editing of the PDF document
TableOfContents Controls the table of the contents automatically created in the PDF document from HTML heading tags
UseBrowserOutlineMode Controls if the document outline is created in browser mode. The default is false
Viewer Controls the PDF viewer preferences

Methods

AddEndPdf(Byte) Add a PDF to the list of documents to be included after the converted HTML content in the final PDF
AddEndPdf(String) Add a PDF from a file to the list of documents to be included after the converted HTML content in the final PDF
AddStartPdf(Byte) Add a PDF from a memory buffer to the list of documents to be included before the converted HTML content in the final PDF
AddStartPdf(String) Add a PDF from a file to the list of documents to be included before the converted HTML content in the final PDF
Equals
(Inherited from Object)
Finalize
(Inherited from Object)
GetHashCode
(Inherited from Object)
GetType
(Inherited from Object)
MemberwiseClone
(Inherited from Object)
ToString
(Inherited from Object)

See Also