Class HtmlConverterOptions

Namespace
SoftZenPdf.Html
Assembly
SoftZenPdf.dll

Options for HtmlConverter.

public sealed class HtmlConverterOptions
Inheritance
HtmlConverterOptions
Inherited Members

Properties

AllowFilesOutsideBaseDirectory

Whether absolute paths and paths leading outside BaseDirectory may be read. Defaults to false, so untrusted HTML cannot pull in other files.

BaseDirectory

The folder relative image and style sheet paths are read from. Files outside it are not read unless AllowFilesOutsideBaseDirectory is set. null (the default) reads no files.

CreateBookmarks

Whether headings (h1 to h6) become bookmarks. Defaults to true.

Fonts

The fonts text can use; @font-face fonts are added to it. Defaults to a provider with the 14 standard fonts.

PageSetup

Page size and margins, unless the HTML sets them with @page. Defaults to A4 with 0.5 inch margins.

ResourceLoader

Loads resources the converter cannot read itself, such as https: images and style sheets: given the URL, return the bytes, or null if it is not available. Nothing is fetched from the network otherwise.

UserStyleSheet

Extra CSS applied after the document's own style sheets, for example to set fonts for every page.