Click or drag to resize

HtmlToPdfOptions Properties

The HtmlToPdfOptions type exposes the following members.

Properties
 NameDescription
Public propertyBaseUrl Gets and sets base URL when converting HTML string. All assets such as CSS, JavaScript files and images will be loaded relative to that base URL. Default: null. (For example, "https://example.com", "d:\my webs\").
Public propertyCode exampleChromiumBaseDirectory Gets and sets a custom directory where will be placed portable Chromium browser. Default value depends of platform (win-x64, win-86, linux-x64 or osx-x64)Current directory\runtimes\win-x64\native\.
Public propertyChromiumRevision Gets and sets the Chromium revision. Defaults: Windows - "1115623", Linux - "1115563", MacOs - "1115611".
Public propertyCode exampleFooter Footer in HTML format. Default: String.Empty. Should be valid HTML markup with 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
Public propertyCode exampleHeader Header in HTML format. Default: String.Empty. Should be valid HTML markup with 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
Public propertyCode examplePageSetup Gets and sets the page setup properties: paper type, orientation, margins and so forth.
Public propertyCode examplePrintBackground Print background graphics. Default: true.
Public propertyScale Scale of the webpage rendering. Default: 1.0M. Scale amount must be between 0.1 and 2.
Public propertyViewPortOptions Gets or sets browser Width and Height and some other options. Default: 1920x1080.
Top
See Also