public class HtmlToPdfConverter| HtmlToPdfConverter | Creates a HTML to PDF converter object with default options |
| AllowInsecureContent | Allows loading insecure HTTP content in secure HTTPS pages. The default value is false |
| AuthenticationOptions | This property can be set with a username and password to authenticate with the web server before accessing the HTML page |
| AutoResizeHtmlViewerHeight | This property controls if the HTML viewer will be automatically resized to the HTML content height determined after the initial loading, followed by a content reload. The auto resized height is limited by the MaxHtmlViewerHeight property. This is useful to render web pages which load only the content which is visible in browser viewport. By default this property is false |
| BlockedHosts | A list of host names or IP address prefixes the converter is not allowed to access when loading the page and its resources |
| ConversionDelay | An additional time in seconds to wait for asynchronous items to be completely loaded or for a web page redirect to finish before starting the rendering in HTML to PDF converter. It is used when the conversion triggering mode is Auto. Default value is 0 |
| ConversionInfo | Gets detailed information about the HTML to PDF conversion process, including the number of pages inserted before and after the HTML content, the number of pages generated from the HTML, and the total page count in the final PDF document. This property is populated only after a conversion operation completes. |
| ConvertedElementsSelector | Gets or sets the CSS selector used to identify the elements to include in the PDF. If this is not set or matches no elements, the entire HTML document will be converted |
| DigitalSignature | The digital signature to apply to generated PDF document |
| DisableSiteIsolation | Disables site isolation when loading content from different sources. The default value is false |
| DisableWebSecurity | Disables web security features such as CORS and same-origin policy. The default value is false |
| EnableElevatedRendering | Enables the HTML renderer to inherit the elevated privileges of the application using the library when the application is running elevated on Windows. The default value is true |
| EnableSoftwareGpuRendering | When set to true, hardware GPU rendering is disabled and software rendering is used for both general page rendering and WebGL content. When set to false, hardware GPU rendering is allowed and is further controlled by GpuRenderingEnabled and GpuCompositingEnabled. The default value is false |
| EncodeHttpPostFields | When true (default), the converter applies application/x-www-form-urlencoded encoding to the names and values in the HttpPostFields collection when building the POST request body: spaces are encoded as '+' and reserved characters are percent-encoded. Set to false only if the names and values are already form-urlencoded by the caller. |
| ExcludedElementsSelector | Gets or sets the CSS selector used to identify elements that should be excluded from the PDF output. These elements will be hidden or removed based on configuration |
| GpuCompositingEnabled | A flag indicating if hardware GPU compositing is enabled in the HTML to PDF converter. This property has effect only when EnableSoftwareGpuRendering is false. Hardware WebGL rendering may require both GpuRenderingEnabled and GpuCompositingEnabled to be enabled, depending on system and driver support. The default value is false |
| GpuRenderingEnabled | A flag indicating if hardware GPU rendering is enabled in the HTML to PDF converter. This property has effect only when EnableSoftwareGpuRendering is false. The default value is false |
| HtmlElementsInfo | Gets the collection of HTML element metadata collected during conversion. Will be if no data collection was triggered by HtmlElementsInfoSelector |
| HtmlElementsInfoHiddenElementsSelector | Gets or sets the CSS selector used to identify collected HTML elements that will be hidden in the generated PDF. If or empty, no collected HTML elements are hidden. The default value is |
| HtmlElementsInfoIncludeIFrames | Gets or sets a value indicating whether HtmlElementsInfoSelector is also applied to iframes. The default value is |
| HtmlElementsInfoSelector | Gets or sets the CSS selector used to identify HTML elements for metadata collection in the HtmlElementsInfo object. If or empty, element data will not be collected |
| HtmlLoaderFilePath | Sets the full path of the HTML loader file |
| HtmlViewerHeight | Gets or sets the initial HTML viewer height, in pixels. The default value is 2048 pixels |
| HtmlViewerWidth | Gets or sets the width of the browser window in pixels. The HTML is loaded and laid out in this window, then printed to the PDF page. When the width is not set, it is computed at conversion time from the page layout and the zoom. Setting a value ends the automatic layout of the layout methods: the value is used as it is, until a layout method is called again. The default value is 1024 |
| HtmlViewerZoom | Gets or sets the zoom percentage, from 10 to 200, decimals allowed, like the zoom of a browser when it prints: a lower zoom fits more content on a page, at a smaller size. When the zoom is not set, it is computed at conversion time from the page layout and the browser window width. Setting a value ends the automatic layout of the layout methods: the value is used as it is, until a layout method is called again. The default value is 100 |
| HttpPostFields | Returns the collection of HTTP POST fields to be used when accessing a web page in HTML to PDF converter. Each entry contains a parameter name and value. By default the converter form-urlencodes the names and values when building the POST body; see EncodeHttpPostFields if the values are already encoded. If there are elements in collection then the converter will make a POST request to the web page URL with the fields from this collection, otherwise it will make a GET request |
| HttpRequestCookies | Gets a collection of custom HTTP cookies to be sent by the HTML to PDF converter to the web server when the web page to convert and the resources (image, css, etc) referenced by the web page are requested. A cookie is defined by a name and a value pair that can be added to the collection using the Add(String, String) method of the HttpRequestCookies property. A valid cookie name and a RFC 6265-encoded value must be provided. |
| HttpRequestHeaders | Gets a collection of custom HTTP headers to be sent by the HTML to PDF converter to the web server when the web page is requested from a URL. A custom HTTP header is defined by a name and a value pair that can be added to the collection using the Add(String, String) method of the HttpRequestHeaders property. A valid HTTP header name and a printable ASCII value must be provided. The custom HTTP headers can be used to define cookies, authentication options, URL referrer or any other HTTP header to be sent to the web browser. The preferred method to send cookies is to use the HttpRequestCookies property. |
| IgnoreCertificateErrors | Ignores certificate validation errors such as expired, self-signed or invalid certificates. The default value is false |
| JavaScriptEnabled | A flag indicating if JavaScript execution is enabled in HTML to PDF converter. The default is true. |
| LayoutMethod | Gets the layout method in use: the last layout method called, or Manual after HtmlViewerZoom or HtmlViewerWidth was set. A new converter uses FitBrowserWindowToPage |
| LazyImagesLoadMode | The lazy image loading mode used by the HTML to PDF converter. This flag has effect only if LoadLazyImages is also true. The default mode is Browser |
| LoadLazyImages | A flag indicating whether the lazy images are loaded during the HTML to PDF conversion. By default, this property is set to true. For optimal performance, you can set this property to false |
| LocalFilesEnabled | This property controls if the converter can convert local file. The default value is true |
| LocalhostEnabled | This property controls if the converter can convert URLs from localhost. The default value is true |
| MaxHtmlViewerHeight | Gets or sets the maximum HTML viewer height in pixels. Value 0 means unlimited. The default value is 32000 pixels |
| MaxJsRedirects | Gets or sets the maximum number of JavaScript-initiated redirects to follow in the main frame after the initial page load and before starting PDF rendering. Set this value to 0 to disable following JavaScript redirects. The default value is 10 |
| MediaType | Gets or sets the CSS media type used to render the HTML: "screen", the default, or "print". The print media type is also applied when RepeatTableHeaderFooter is true or when a header or footer hidden on some pages has ReserveSpaceAlways set to false |
| NavigationTimeout | The HTML to PDF converter navigation timeout in seconds. Default value is 120 |
| PdfDocumentInfo | Gets a reference to the object to controlling the generated PDF document information like the document title, author, subject or creation date. |
| PdfDocumentOptions | Gets a reference to the object controlling the conversion process and the generated PDF document properties like PDF document margins, PDF page size and orientation, PDF document header and footer |
| PdfSecurityOptions | Gets a reference to the object to controlling the generated PDF document security settings like user and owner password, restrict printing or editing of the generated PDF document. |
| PdfViewerPreferences | Gets a reference to the object controlling how the generated PDF is displayed by a PDF viewer. |
| PersistentHttpRequestHeaders | This property can be set to `true` to instruct the HTML to PDF converter to send the custom headers defined by the `HttpRequestHeaders` property whenever an external resource (e.g., images, CSS, etc.) referenced by the web page is requested. The default value of this property is `false` |
| RemoveExcludedElements | Gets or sets a value indicating whether elements matched by ExcludedElementsSelector should be completely removed from the layout rather than just hidden. The default value is true |
| RemoveUnselectedElements | Gets or sets a value indicating whether elements that are not matched by ConvertedElementsSelector should be completely removed from the layout rather than just hidden. The default value is true |
| ScriptToExecuteAfterLoad | A JavaScript code to execute immediately after the page was loaded. It can be used to automatically click buttons or for other operations before conversion. By default this property is null |
| TriggeringMode | The conversion triggering mode used by the HTML to PDF converter. The default value is Auto. |
| UncPathEnabled | This property controls if the converter can convert files from local network. The default value is true |
| UseDelayForViewerResize | This property controls if the ConversionDelay is also applied during the initial loading when the HTML content size is determined. This propery has effect only if the AutoResizeHtmlViewerHeight flag is on. By default this property is false for faster conversion |
| WaitForAfterLoadScript | A flag indicating if the HTML to PDF converter should wait for the script specified by ScriptToExecuteAfterLoad to finish execution before continuing conversion. By default, this flag is set to false and the HTML to PDF conversion continues immediately after the script is injected |
| WriteHtmlToFileBeforeConvert | When true, the HTML string is first written to a temporary file before conversion. When false, the HTML string is passed directly to the converter without file system involvement. The default value is false |
| ConvertHtml | Converts a HTML string to PDF using a base URL to resolve external resources and returns the rendered PDF document into a memory buffer. A new instance of HtmlToPdfConverter must be created for each call to this method |
| ConvertHtmlAsync | Asynchronously converts a HTML string to PDF using a base URL to resolve external resources and returns the rendered PDF document into a memory buffer. A new instance of HtmlToPdfConverter must be created for each call to this method |
| ConvertHtmlToFile | Converts a HTML string to PDF using a base URL to resolve external resources and writes the rendered PDF document into a file. A new instance of HtmlToPdfConverter must be created for each call to this method |
| ConvertHtmlToFileAsync | Asynchronously converts a HTML string to PDF using a base URL to resolve external resources and writes the rendered PDF document into a file. A new instance of HtmlToPdfConverter must be created for each call to this method |
| ConvertUrl | Converts an URL to PDF and returns the rendered PDF document into a memory buffer. A new instance of HtmlToPdfConverter must be created for each call to this method |
| ConvertUrlAsync | Asynchronously converts an URL to PDF and returns the rendered PDF document into a memory buffer. A new instance of HtmlToPdfConverter must be created for each call to this method |
| ConvertUrlToFile | Converts an URL to PDF and writes the generated PDF document into a file. A new instance of HtmlToPdfConverter must be created for each call to this method |
| ConvertUrlToFileAsync | Asynchronously converts an URL to PDF and writes the generated PDF document into a file. A new instance of HtmlToPdfConverter must be created for each call to this method |
| Equals | (Inherited from Object) |
| Finalize | (Inherited from Object) |
| FitBrowserWindowToPage | Renders the HTML in a browser window of the given width and scales the result to fit the page width, reducing it on a page narrower than the window and enlarging it on a wider one. The scale is computed when the PDF is generated, from the page size, the orientation and the margins. To render at the page width without scaling, use LayoutAtPageWidth. This is the layout of a new converter, with an A4 page in portrait orientation and a 1024 pixel browser window |
| GetHashCode | (Inherited from Object) |
| GetType | (Inherited from Object) |
| LayoutAtPageWidth | Renders the HTML at the width of the page, without scaling, with the screen media type unless another media type is given. For HTML templates designed for a paper size, like invoices and reports |
| MemberwiseClone | (Inherited from Object) |
| PageWidthFromBrowserWindow | The page width follows the browser window width and the HTML is rendered without scaling, one CSS pixel being 0.75 points |
| PrintLikeChrome | Renders the HTML the way the Chrome browser prints it to PDF: print media type, margins of 1 cm on each side and no background colors or images |
| SinglePageOfWidth | Renders the HTML on a single page of the given width, as tall as the content. For receipts and tickets: 80 mm paper is 227 points, 58 mm paper is 164 points |
| ToString | (Inherited from Object) |