Click or drag to resize

HtmlToPdfOptions Class

Various HTML to PDF conversion options, such as: Page Size, Orientation, Header, Footer, Page Margins, Scale and so forth.
Inheritance Hierarchy
SystemObject
  SautinSoft.PdfVisionHtmlToPdfOptions

Namespace: SautinSoft.PdfVision
Assembly: SautinSoft.PdfVision (in SautinSoft.PdfVision.dll) Version: 2024.12.6
Syntax
public class HtmlToPdfOptions

The HtmlToPdfOptions type exposes the following members.

Constructors
 NameDescription
Public methodCode exampleHtmlToPdfOptions Default constructor for the HtmlToPdfOptions class.
Top
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
Methods
 NameDescription
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
See Also