Html | |
The HtmlToImage type exposes the following members.
| Name | Description | |
|---|---|---|
| HtmlToImage | Initializes a new converter with the default virtual browser width (1024px). | |
| HtmlToImage(Int32) | Initializes a new converter with the specified virtual browser width. | |
| HtmlToImage(Int32, Int32) | Initializes a new converter with the specified virtual browser width and height. |
| Name | Description | |
|---|---|---|
| AuthenticationPassword | The password for HTTP basic authentication. | |
| AuthenticationUsername | The user name for HTTP basic authentication. | |
| ChromiumEnginePath | The path to the conversion engine folder. Empty resolves it next to the assembly. | |
| ChromiumEngineTemporaryFilesPath | The path used by the conversion engine for temporary files. | |
| ClickElementsDelayAfter | Delay (ms) after clicking the elements in ClickElementsSelectors. | |
| ClickElementsDelayBefore | Delay (ms) before clicking the elements in ClickElementsSelectors. | |
| ClickElementsSelectors | CSS selectors of elements to click before capturing. | |
| ConversionDelay | Additional time in seconds the converter waits after the web page has loaded, before it is rendered. | |
| CustomCSS | Extra CSS injected into the page before capture. | |
| DenyLocalFileAccess | When true, local file access is denied during the conversion. | |
| DrawBackground | Whether the page background is drawn into the image. Default true. | |
| EnableOfflineMode | Whether the browser runs in offline mode. Default false. | |
| ForceOutOfProcess | Runs this conversion in a separate engine process, whatever ChromiumEngineHostMode says. | |
| HttpCache | Selects what the engine's HTTP cache keeps from this conversion for the next one. | |
| HttpCookies | HTTP cookies sent with the request. | |
| HttpHeaders | Additional HTTP request headers. | |
| HttpPostParameters | HTTP POST parameters (turns the request into a POST). | |
| ImageFormat | The format of the image returned by ConvertUrl(String) / ConvertHtmlString(String). Default Png (the engine's native output). Set to Jpeg, Bmp, or Tiff to receive the bytes already encoded in that format. | |
| JavaScriptEnabled | Whether JavaScript is enabled during rendering. Default true. | |
| LazyImagesLoadingDelay | Delay (ms) used while triggering lazy image loading. Default 40. | |
| LazyImagesLoadingEnabled | Whether lazy-loaded images are forced to load before capture. Default true. | |
| LFN | The path of the diagnostic log file written during conversion. Empty disables logging. | |
| LoginOptions | Form-login options performed before navigating to the target page. | |
| MaxConversionTime | Maximum time (seconds) for the whole conversion. Default 60. | |
| MaxPageLoadTime |
The time in seconds to wait for the web page to load. Obsolete: use NavigationTimeout.
Obsolete | |
| MinPageLoadTime |
Additional time in seconds to wait before the web page is rendered. Obsolete: use ConversionDelay.
Obsolete | |
| NavigationTimeout | The time in seconds the converter waits for the web page to load. | |
| PostLoadingScript | JavaScript run after the page loads, before capture. | |
| PostLoadingScriptDelayAfter | Delay (ms) after running PostLoadingScript. | |
| ProxyOptions | Proxy settings for the conversion. | |
| RenderingEngine | Gets or sets the rendering engine used to load and render the html. Chromium is the only engine and the default. | |
| StartupMode | The startup mode of the conversion (Automatic or Manual). | |
| StartupScript | JavaScript run at startup (before the page loads) in Manual startup mode. | |
| VisibleWebElementId |
Convert only the html element with the specified id.
Obsolete | |
| VisibleWebElementSelector | Convert only the part of the page matched by this CSS selector; the rest is ignored. | |
| WebGlEnabled | Controls WebGL support in the rendering engine. | |
| WebPageFixedSize | When true, the virtual browser uses the exact WebPageWidth / WebPageHeight without auto-sizing. | |
| WebPageHeight | The virtual browser height, in pixels. Default 0 (auto — the full content height). | |
| WebPageWidth | The virtual browser width, in pixels. Default 1024. | |
| WindowStatus | When set, the engine waits until window.status equals this value before capturing. |
| Name | Description | |
|---|---|---|
| ConvertHtmlString(String) | Converts the specified HTML string to an image in ImageFormat (PNG by default). | |
| ConvertHtmlString(String, String) | Converts the specified HTML string to an image in ImageFormat (PNG by default), resolving relative urls against the base url. | |
| ConvertHtmlStringAsync(String) | Asynchronously converts the specified HTML string to an image in ImageFormat (PNG by default). | |
| ConvertHtmlStringAsync(String, String) | Asynchronously converts the specified HTML string to an image in ImageFormat (PNG by default), resolving relative urls against the base url. | |
| ConvertHtmlStringAsync(String, CancellationToken) | Asynchronously converts the specified HTML string to an image in ImageFormat (PNG by default), stopping when the specified token is cancelled. | |
| ConvertHtmlStringAsync(String, String, CancellationToken) | Asynchronously converts the specified HTML string to an image in ImageFormat (PNG by default), resolving relative urls against the base url and stopping when the specified token is cancelled. | |
| ConvertUrl | Converts the web page at the specified url to an image in ImageFormat (PNG by default). | |
| ConvertUrlAsync(String) | Asynchronously converts the web page at the specified url to an image in ImageFormat (PNG by default). | |
| ConvertUrlAsync(String, CancellationToken) | Asynchronously converts the web page at the specified url to an image in ImageFormat (PNG by default), stopping when the specified token is cancelled. |