This class represents the HTML to Image converter and offers the necessary properties and methods to convert HTML documents to raster images.
This class is still present in the API to maintain the backward compatibility and it will be replaced by HtmlToImageConverter class in the future versions
Inheritance Hierarchy
WinnovativeHtmlToImageConverter
WinnovativeImgConverter
Namespace: Winnovative
Assembly: wnvhtmltopdf (in wnvhtmltopdf.dll) Version: 17.0.0.0
Syntax
The ImgConverter type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ImgConverter |
This constructor creates a HTML to Image converter using the default width and height for the HTML viewer
| |
ImgConverter(Int32) |
This constructor creates a HTML to Image converter using the given width in pixels and the default height for the HTML viewer
| |
ImgConverter(Int32, Int32) |
This constructor creates a HTML to Image converter using the given width and height in pixels of the HTML viewer
|
Properties
Name | Description | |
---|---|---|
AuthenticationOptions |
This property can be set with an username and a password in order to authenticate to the web server
before accessing the URL to be converted in HTML to Image converter. They can be used for example to resolve the IIS Integrated Windows Authentication
or other types of IIS authentication.
(Inherited from HtmlToImageConverter.) | |
ClipHtmlView |
If the HTML content is not entirely visible in the HTML viewer of the HTML to Image converter at the specified width, the ClipHtmlView property will control whether the
HTML content is clipped or the HTML viewer width is automatically extended to make visible the whole HTML content.
The HTML viewer width is given by the HtmlViewerWidth property.
The default value of this property is false.
(Inherited from HtmlToImageConverter.) | |
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 Image converter. Default value is 2.
(Inherited from HtmlToImageConverter.) | |
DefaultHtmlEncoding |
The default HTML document text encoding to be used if there is no charset meta tag defined in the HTML document. By default this property is not set
and an auto determined text encoding will be used by converter
(Inherited from HtmlToImageConverter.) | |
DownloadAllResources |
Gets or sets a flag indicating if the HTML to Image converter should try to download all the resources even if this could cause
a slower conversion. The default value is false.
(Inherited from HtmlToImageConverter.) | |
Enable3DTransformations |
Gets or sets a flag indicating if the accelerated CSS 3D transformations are enabled in the HTML to Image converter. The default value is false
(Inherited from HtmlToImageConverter.) | |
EnableAccelerated2DCanvas |
Gets or sets a flag indicating if the accelerated 2D canvas is enabled in the HTML to Image converter. The default value is false
(Inherited from HtmlToImageConverter.) | |
EnableHttp2 |
Gets or sets a flag indicating if the HTTP2 protocol is enabled in HTML to Image converter.
The property has effect only in NE version of the library. The default value is false
(Inherited from HtmlToImageConverter.) | |
EnablePersistentStorage |
Gets or sets a flag indicating if the persistent local storage is enabled in the HTML to Image converter. The default value is false
(Inherited from HtmlToImageConverter.) | |
EnableWebGL |
Gets or sets a flag indicating if the WebGL is enabled in the HTML to Image converter. The default value is false
(Inherited from HtmlToImageConverter.) | |
ExtensionsEnabled |
Gets or sets a flag indicating if the HTML viewer extensions are executed during the HTML to Image conversion. The default value is false and no extension is executed.
The Flash player for Mozilla Firefox must be installed in order to execute the flash content from HTML
(Inherited from HtmlToImageConverter.) | |
HtmlViewerHeight |
Gets or sets the HTML viewer height in pixels in the HTML to Image converter.
If the specified HTML viewer height is 0 the HTML viewer height will be automatically determined based on the HTML content and
the HTML viewer width in order to make visible the whole HTML content.
The HTML viewer width is given by the HtmlViewerWidth property.
If the HTML content is not entirely visible in the HTML viewer at the specified width, the ClipHtmlView property will control whether the
HTML content is clipped or the HTML viewer width is automatically extended to make visible the whole HTML content.
The HTML viewer height can also be specified in the HtmlToImageConverter class contructor. The default value is 0 to automatically determine
the HTML viewer height based on the HTML content and the HTML viewer width.
(Inherited from HtmlToImageConverter.) | |
HtmlViewerWidth |
Gets or sets the preferred HTML viewer width in pixels in the HTML to Image converter.
If the HTML content is not entirely visible in the HTML viewer at the specified width, the ClipHtmlView property will control whether the
HTML content is clipped or the HTML viewer width is automatically extended to make visible the whole HTML content.
By default the ClipHtmlView property is false and the HTML viewer is automatically extended in width to make visible the whole HTML content.
The HTML viewer width can also be specified in the HtmlToImageConverter class constructor. The default value is 1024 pixels.
(Inherited from HtmlToImageConverter.) | |
HtmlViewerZoom |
Gets or sets the HTML viewer zoom percentage in HTML to Image Converter similar to zoom level in a browser.
The default value of this property is 100
(Inherited from HtmlToImageConverter.) | |
HttpPostFields |
Returns the collection of HTTP POST fields to be used when accessing a web page in the HTML to Image converter.
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
(Inherited from HtmlToImageConverter.) | |
HttpRequestCookies |
Gets a collection of custom HTTP cookies to be sent by the HTML to Image 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.
(Inherited from HtmlToImageConverter.) | |
HttpRequestHeaders |
Gets a collection of custom HTTP headers to be sent by the HTML to Image 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.
The PersistentHttpRequestHeaders property can be set on true to instruct the converter to send the custom headers
each time an external resource (image, css, etc) referenced by the web page is requested. By default the PersistentHttpRequestHeaders
property is false and the custom headers are not automatically sent to the web server when the web page resources are requested.
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.
(Inherited from HtmlToImageConverter.) | |
ImagePartSize |
Gets or sets the maximum height in pixels of an image part in HTML to Image converter
(Inherited from HtmlToImageConverter.) | |
ImpersonationOptions |
The impersonation options applied during navigation in HTML to Image converter
(Inherited from HtmlToImageConverter.) | |
InitialHtmlViewerHeight |
Gets or sets the initial height in pixels of the HTML viewer in HTML to Image converter.
This value of this property is ignored if the HtmlViewerHeight property is set
(Inherited from HtmlToImageConverter.) | |
InterruptSlowJavaScript |
Gets or sets a flag indicating if the slow JavaScript script should be interrupted in HTML to Image converter. The default value is false and the scripts are not interrupted
(Inherited from HtmlToImageConverter.) | |
JavaScriptEnabled |
A flag indicating if JavaScript execution is enabled in HTML to Image converter.
The default value is true
(Inherited from HtmlToImageConverter.) | |
LicenseKey |
Gets or sets the license key string received from the vendor in HTML to Image converter.
If this property is null the converter will automatically enter in evaluation mode
and a demo watermark will be displayed on the generated image.
(Inherited from HtmlToImageConverter.) | |
LocalFilesAccessEnabled |
Gets or sets a flag indicating if the access to local files is enabled in the HTML to Image converter. The default value is true
(Inherited from HtmlToImageConverter.) | |
ManualTriggeringConversionDelay |
An additional time in seconds to wait after manual triggering before
starting the rendering in HTML to Image converter. Default value is 2.
(Inherited from HtmlToImageConverter.) | |
MaxHtmlViewerHeight |
Gets or sets the maximum height in pixels to be rendered from the HTML document by the HTML to Image converter.
The default value is 0 and the entire HTML document is rendered
(Inherited from HtmlToImageConverter.) | |
MediaType |
Gets or sets the media type of the HTML document used by the HTML to Image converter. The default media type is 'screen'.
If you set this property with 'print' then the CSS properties defined in '@media print' rule will be used to render the document
(Inherited from HtmlToImageConverter.) | |
MinHtmlViewerHeight |
Gets or sets the minimum height in pixels to be rendered from HTML document by the HTML to Image converter.
This value of this property is ignored if the HtmlViewerHeight property is set
(Inherited from HtmlToImageConverter.) | |
NavigationTimeout |
The HTML to Image converter navigation timeout in seconds. Default value is 60.
(Inherited from HtmlToImageConverter.) | |
NavigatorUserAgent |
The custom user agent to be used when accessing the HTML page. When this property is null or empty the default user agent is used
(Inherited from HtmlToImageConverter.) | |
PersistentHttpRequestHeaders |
The PersistentHttpRequestHeaders property can be set on true to instruct the HTML to Image converter to send the custom headers defined by the
HttpRequestHeaders property each time an external resource (image, css, etc) referenced by the web page is requested.
The default value of this property is true and the custom headers are automatically sent to the web server when the web page resources are requested.
(Inherited from HtmlToImageConverter.) | |
PrerenderEnabled |
Gets or sets a flag indicating if the HTML to Image converter should perform a pre-rendering. The default value is false
(Inherited from HtmlToImageConverter.) | |
ProxyOptions |
Gets a reference to an object encapsulating the proxy options used by HTML to Image converter to access the HTML document to convert.
(Inherited from HtmlToImageConverter.) | |
RenderedHtmlElementSelector |
Get or set the CSS selector of the HTML element to be rendered by the HTML to Image converter. If the selector selects multiple HTML elements,
only the the first one will be converted. The CSS selector is case sensitive. If this property is not set then the entire
HTML document is rendered
(Inherited from HtmlToImageConverter.) | |
SvgFontsEnabled |
Gets or sets a flag indicating if the SVG fonts are enabled in HTML during HTML to Image conversion. The default value is true
(Inherited from HtmlToImageConverter.) | |
TiledImageEnabled |
A flag indicating if the image captured by converter is tiled. The default value is true
(Inherited from HtmlToImageConverter.) | |
TransparentBackground |
Gets or sets a flag indicating if the resulted image will have a transparent background when converting a HTML document without a defined background color or image.
This property is false by default
(Inherited from HtmlToImageConverter.) | |
TriggeringMode |
The conversion triggering mode used by the HTML to Image converter. The default value is ConversionDelay.
(Inherited from HtmlToImageConverter.) | |
WebFontsEnabled |
Gets or sets a flag indicating if the Web Fonts are enabled in HTML during the HTML to Image conversion. The default value is true
(Inherited from HtmlToImageConverter.) | |
WnvInternalFileName |
Sets the full path of wnvinternal.dat helper file of the HTML to Image converter. By default this file is expected to be found
in the same folder with wnvhtmltopdf.dll assembly.
(Inherited from HtmlToImageConverter.) | |
XPSupplementalLanguages |
A flag in HTML to Image converter indicating if the supplemental languages (complex script, right-to-left, East Asian) support was enabled in Windows XP Regional and Language Options. The default value is false.
(Inherited from HtmlToImageConverter.) |
Methods
Name | Description | |
---|---|---|
ConvertHtml |
Converts a HTML string to an image having the given format using a base URL to resolve external resources
and returns the rendered image into a memory buffer
(Inherited from HtmlToImageConverter.) | |
ConvertHtmlFile |
Converts a HTML file to an image having the given format and returns the rendered image into a memory buffer
(Inherited from HtmlToImageConverter.) | |
ConvertHtmlFileToFile |
Converts a HTML file to an image having the given format and writes the rendered image into a file
(Inherited from HtmlToImageConverter.) | |
ConvertHtmlStream |
Converts the HTML string read from a stream to an image having the given format using a base URL to resolve external resources
and returns the rendered image into a memory buffer
(Inherited from HtmlToImageConverter.) | |
ConvertHtmlStreamToFile |
to resolve external resources
and writes the rendered image into a fileConverts the HTML string read from a stream to an image having the given format using a base URL
(Inherited from HtmlToImageConverter.) | |
ConvertHtmlToFile |
Converts a HTML string to an image having the given format using a base URL to resolve external resources and writes the rendered image into a file
(Inherited from HtmlToImageConverter.) | |
ConvertHtmlToImageObject |
Converts a HTML string to an Image object using a base URL to resolve external resources
(Inherited from HtmlToImageConverter.) | |
ConvertHtmlToImageTiles(String, String) |
Converts a HTML string to a set of Image objects using a base URL to resolve external resources.
The image is tiled to avoid working with very large images in memory
(Inherited from HtmlToImageConverter.) | |
ConvertHtmlToImageTiles(String, String, String) |
Converts a HTML string to a set of Image objects using a base URL to resolve external resources and an internal links base URL.
The image is tiled to avoid working with very large images in memory
(Inherited from HtmlToImageConverter.) | |
ConvertUrl |
Converts an URL to an image having the given image format and returns the rendered image into a memory buffer
(Inherited from HtmlToImageConverter.) | |
ConvertUrlToFile |
Converts an URL to an image having the given format and writes the rendered image into a file
(Inherited from HtmlToImageConverter.) | |
ConvertUrlToImageObject |
Converts an URL to an Image object
(Inherited from HtmlToImageConverter.) | |
ConvertUrlToImageTiles |
Converts an URL to a set of Image objects.
The image is tiled to avoid working with very large images in memory
(Inherited from HtmlToImageConverter.) | |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetImageBytesFromHtmlFile |
Converts a HTML file to an image having the given format. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlFile(String, ImageFormat) method in the future versions
| |
GetImageBytesFromHtmlStream(Stream, Encoding, ImageFormat) |
Converts the HTML string read from a stream to an image having the given format.
This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlStream(Stream, Encoding, String, ImageFormat) method in the future versions
| |
GetImageBytesFromHtmlStream(Stream, Encoding, ImageFormat, String) |
Converts the HTML string read from a stream to an image having the given format using a base URL.
This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlStream(Stream, Encoding, String, ImageFormat) method in the future versions
| |
GetImageBytesFromHtmlString(String, ImageFormat) |
Converts a HTML string to an image having the given format. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtml(String, String, ImageFormat) method in the future versions
| |
GetImageBytesFromHtmlString(String, ImageFormat, String) |
Converts a HTML string to an image having the given format using a base URL. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtml(String, String, ImageFormat) method in the future versions
| |
GetImageBytesFromUrl |
Converts an URL to an image having the given image format. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertUrl(String, ImageFormat) method in the future versions
| |
GetImageFromHtmlString(String) |
Converts a HTML string to an image object. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlToImageObject(String, String) method in the future versions
| |
GetImageFromHtmlString(String, String) |
Converts a HTML string to an Image object using a base URL. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlToImageObject(String, String) method in the future versions
| |
GetImageFromUrl |
Converts an URL to an image object. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertUrlToImageObject(String) method in the future versions
| |
GetImageTilesFromHtmlString(String) |
Converts a HTML string to a set of image objects. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlToImageTiles(String, String) method in the future versions
| |
GetImageTilesFromHtmlString(String, String) |
Converts a HTML string to a set of image objects using a base URL. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlToImageTiles(String, String) method in the future versions
| |
GetImageTilesFromHtmlString(String, String, String) |
Converts a HTML string to a set of image objects using a base URL and an internal links base URL.
This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlToImageTiles(String, String, String) method in the future versions
| |
GetImageTilesFromUrl |
Converts an URL to an array of image objects. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertUrlToImageTiles(String) method in the future versions
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SaveImageFromHtmlFileToFile |
Converts a HTML file to an image having the given format. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlFileToFile(String, ImageFormat, String) method in the future versions
| |
SaveImageFromHtmlStreamToFile(Stream, Encoding, ImageFormat, String) |
Converts the HTML string read from a stream to an image having the given format. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlStreamToFile(Stream, Encoding, String, ImageFormat, String) method in the future versions
| |
SaveImageFromHtmlStreamToFile(Stream, Encoding, ImageFormat, String, String) |
Converts the HTML string read from a stream to an image having the given format using a base URL.
This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlStreamToFile(Stream, Encoding, String, ImageFormat, String) method in the future versions
| |
SaveImageFromHtmlStringToFile(String, ImageFormat, String) |
Converts a HTML string to an image having the given format. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlToFile(String, String, ImageFormat, String) method in the future versions
| |
SaveImageFromHtmlStringToFile(String, ImageFormat, String, String) |
Converts a HTML string to an image having the given format using a base URL. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertHtmlToFile(String, String, ImageFormat, String) method in the future versions
| |
SaveImageFromUrlToFile |
Converts an URL to an image having the given format. This method is still present in the API to maintain the backward compatibility and it will be replaced
by ConvertUrlToFile(String, ImageFormat, String) method in the future versions
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
See Also