public class HtmlToPdf| HtmlToPdf | The default constructor |
| AfterLoadJavaScript | A JavaScript code to execute immediately after the page was loaded. It can be used for example to simulat a button click in HTML page before conversion. The default value is null |
| AllowInsecureContent | Allows loading insecure HTTP content in secure HTTPS pages. The default value is false |
| Authentication | The object exposed by this propery encapsulates a username and a password that can be used to access web pages requiring HTTP authentication |
| AutoResizeBrowserHeight | Controls if the browser will be automatically resized to the HTML content height. The auto resized height is limited by the MaxBrowserHeight property. This is useful to render web pages which load only the content which is visible in browser viewport. The default value is false |
| AutoResizeBrowserWidth | A flag indicating whether the browser window grows to the width of the HTML content when the content is wider than the window, so that the whole content fits the page instead of being scaled down or cut by the browser. The default value is true |
| BlockedHosts | A list of hosts the converter is not allowed to access when loading the page and its resources. An entry also blocks the subdomains of the host. Hosts are compared by name, so blocking an IP address does not block the host names that resolve to it. |
| BrowserHeight | The browser window height, in pixels. The default height is 2048 pixels. A page as tall as the content does not depend on this value. |
| BrowserWidth | 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 |
| BrowserZoom | 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 |
| 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 |
| 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 |
| Document | The properties of the object exposed by this property control the content and the aspect of the generated PDF document |
| 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 keys 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 keys 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 |
| HtmlLoadedTimeout | The maximum time in seconds to wait for HTML document to be loaded. The default value is 120 seconds. An exception is thrown if the HTML document cannot be loaded in HtmlLoadedTimeout seconds |
| HtmlLoaderFilePath | Sets the full path of the HTML loader file |
| HttpCookies | A collection of HTTP cookies to be used when accessing a web page in HTML to PDF converter. Each entry must contain a valid cookie name and a RFC 6265-encoded value. |
| HttpHeaders | A collection of the HTTP headers to be used when accessing a web page in HTML to PDF converter. Each entry must contain a valid HTTP header name and a printable ASCII value. |
| HttpPostFields | A collection of HTTP POST fields to be used when accessing a web page in HTML to PDF converter. Each entry contains a parameter key and value. By default the converter form-urlencodes the keys and values when building the POST body; see EncodeHttpPostFields if the values are already encoded. If the collection is not empty, the converter will make a POST request to the web page URL with the fields from this collection |
| IgnoreCertificateErrors | Ignores certificate validation errors such as expired, self-signed or invalid certificates. The default value is false |
| LayoutMethod | Gets the layout method in use: the last layout method called, or Manual after BrowserZoom or BrowserWidth 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 |
| MaxBrowserHeight | The maximum browser 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 |
| 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 |
| RepeatHttpHeaders | This property controls if the headers defined by the HttpHeaders property are also used when accessing the resources referenced by the web page, not only when accessing the web page. The default value is false |
| RunJavaScript | Controls if the JavaScript in the HTML document is executed. The default value of this property is true and the JavaScript is executed. |
| TriggerMode | The method of triggering the conversion |
| UncPathEnabled | This property controls if the converter can convert files from local network. The default value is true |
| WaitAfterLoadJavaScript | Controls if converter should wait the script from AfterLoadJavaScript to finish execution before continuing conversion. By default this property is false |
| WaitBeforeBrowserResize | Controls if the WaitBeforeConvert delay is also used when the HTML content size is determined after the initial loading. This property applies only if the AutoResizeBrowserHeight flag is on. The default value is false |
| WaitBeforeConvert | An additional time in seconds to wait before starting the conversion to allow more time to JavaScript to update the web page. The default value is 0 |
| 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 |
| ConvertHtmlToFile | Converts a HTML code to a PDF file. A new instance of HtmlToPdf must be created for each call to this method |
| ConvertHtmlToFileAsync | Asynchronously converts a HTML code to a PDF file. A new instance of HtmlToPdf must be created for each call to this method |
| ConvertHtmlToMemory | Converts a HTML code and produces a PDF document in a memory buffer. A new instance of HtmlToPdf must be created for each call to this method |
| ConvertHtmlToMemoryAsync | Asynchronously converts a HTML code and produces a PDF document in a memory buffer. A new instance of HtmlToPdf must be created for each call to this method |
| ConvertUrlToFile | Converts a HTML document from a given URL to a PDF file. A new instance of HtmlToPdf must be created for each call to this method |
| ConvertUrlToFileAsync | Converts a HTML document from a given URL to a PDF file. A new instance of HtmlToPdf must be created for each call to this method |
| ConvertUrlToMemory | Converts a HTML document from a given URL and produces a PDF document in a memory buffer. A new instance of HtmlToPdf must be created for each call to this method |
| ConvertUrlToMemoryAsync | Asynchronously converts a HTML document from a given URL and produces a PDF document in a memory buffer. A new instance of HtmlToPdf 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 The window grows to the content when the content is wider, see AutoResizeBrowserWidth. |
| 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 The window keeps the width of the paper: AutoResizeBrowserWidth is set to true. |
| 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, or drawn uniformly larger or smaller by the zoom, on a page as wide as the window at that zoom |
| 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) |