HiQPdf Documentation

HtmlToPdf Class

HiQPdf Client for .NET Core
The HTML to PDF converter class
Inheritance Hierarchy

SystemObject
  HiQPdfClientHtmlConverterBase
    HiQPdfClientHtmlToPdf

Namespace:  HiQPdfClient
Assembly:  HiQPdfClient.NetCore (in HiQPdfClient.NetCore.dll) Version: 15.0.0
Syntax

public class HtmlToPdf : HtmlConverterBase

The HtmlToPdf type exposes the following members.

Constructors

  NameDescription
Public methodHtmlToPdf(String)
Creates a HTML to PDF converter to connect on default port to a server given by IP address or by host name
Public methodHtmlToPdf(String, UInt32)
Creates a HTML to PDF converter to connect on the given port to a server given by IP address or by host name
Top
Properties

  NameDescription
Public propertyAcceleratedCanvasEnabled
Controls if the accelerated canvas is enabled. This property is false by default
(Inherited from HtmlConverterBase.)
Public propertyAuthentication
The object exposed by this propery encapsulates a username and a password that can be used to access web pages requiring HTTP authentication
(Inherited from HtmlConverterBase.)
Public propertyBrowserHeight
The browser window height in pixels. The default height is set to render the entire HTML document
(Inherited from HtmlConverterBase.)
Public propertyBrowserUserAgent
The browser custom user agent
(Inherited from HtmlConverterBase.)
Public propertyBrowserWidth
The browser window width in pixels. The default width is 1200 pixels
(Inherited from HtmlConverterBase.)
Public propertyBrowserZoom
The browser window zoom percentage. The default zoom is 100
(Inherited from HtmlConverterBase.)
Public propertyConversionInfo
This property is initialized after conversion with an object containing information about the converted HTML document, about the HTML elements in the HTML document and about the regions rendered in the PDF document
Public propertyConvertedHtmlElementSelector
This property can be set with a value representing the CSS selector of the HTML element to be converted. If many elements in the HTML document are selected, only the the first one will be converted. The values of the attributes in the CSS selectors are case sensitive. If this property is not set then the whole HTML document is converted
(Inherited from HtmlConverterBase.)
Public propertyDefaultCharset
The default character set to be used when the character set meta tag is not set in HTML document header
(Inherited from HtmlConverterBase.)
Public propertyDocument
The properties of the object exposed by this property control the content and the aspect of the generated PDF document
Public propertyForceResourcesDownload
Controls if the HTML converter should force all possible resources to be downloaded. The default value is false
(Inherited from HtmlConverterBase.)
Public propertyHiddenHtmlElements
An array of HTML CSS selectors to select the HTML elements which will not be rendered to PDF
Public propertyHtmlLoadedTimeout
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
(Inherited from HtmlConverterBase.)
Public propertyHttp2Enabled
Controls if the HTTP2 protocol is enabled in NG version. The default value is false
(Inherited from HtmlConverterBase.)
Public propertyHttpCookies
A collection of HTTP cookies to be used when accessing a web page
(Inherited from HtmlConverterBase.)
Public propertyHttpHeaders
A collection of the HTTP headers to be used when accessing a web page
(Inherited from HtmlConverterBase.)
Public propertyHttpPostFields
A collection of HTTP POST fields to be used when accessing a web page. If the collection is not empty, the converter will make a POST request to the web page URL with the fields from this collection
(Inherited from HtmlConverterBase.)
Public propertyImpersonation
The object exposed by this propery encapsulates the properties controlling the internal browser impersonation
(Inherited from HtmlConverterBase.)
Public propertyLayoutWithHinting
Controls if the hinting is used to layout HTML. Layout hinting is disabled by default. Enabling this property can improve the layout but it can make the conversion slower
(Inherited from HtmlConverterBase.)
Public propertyLocalFilesLoadEnabled
Controls if the local files can be loaded by converter. This property is true by default
(Inherited from HtmlConverterBase.)
Public propertyLocalStorageEnabled
Controls if the local web storage is enabled. This property is false by default
(Inherited from HtmlConverterBase.)
Public propertyManualTriggerWaitBeforeConvert
An additional time in seconds to wait before starting the conversion when the triggering mode is set to manual
(Inherited from HtmlConverterBase.)
Public propertyMaxBrowserHeight
This property can be used to set a maximum limit in pixels for the rendered top part of a HTML document. The default value is 0 and the height is not limited
(Inherited from HtmlConverterBase.)
Public propertyMaxImageTileHeight
The maximum height in pixels of the image tiles captured by converter
(Inherited from HtmlConverterBase.)
Public propertyMediaType
Controls the media type for which to render the HTML document. If this property is null or empty the default media type is 'screen'. It can be set to a value like 'print' and in this case the CSS properties defined by the '@media print' rule will be used when the HTML is rendered
(Inherited from HtmlConverterBase.)
Public propertyMinBrowserHeight
This property can be used to set a minimum height in pixels to be rendered. The default value is 0 pixels. This property is ignored when the BrowserHeight property is set
(Inherited from HtmlConverterBase.)
Public propertyPort
The server port number
(Inherited from HtmlConverterBase.)
Public propertyProbeLayout
Controls if the HTML converter should do a probe layout first. The default value is false
(Inherited from HtmlConverterBase.)
Public propertyProxy
The object exposed by this property encapsulates the parameters (address, username, password) that can be used to access web pages through a proxy server
(Inherited from HtmlConverterBase.)
Public propertyRenderPostScriptFonts
Controls if the PostScript fonts are rendered. The default value is true
Public propertyRenderSvgFonts
Controls if the SVG fonts are rendered. The default value is false when converting HTML to PDF or SVG and true when converting HTML to a raster image
(Inherited from HtmlConverterBase.)
Public propertyRenderWebFonts
Controls if the Web Fonts are rendered. The default value is true
(Inherited from HtmlConverterBase.)
Public propertyRepeatHttpHeaders
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 true and the headers are repeated when accessing the referenced resources
(Inherited from HtmlConverterBase.)
Public propertyRetrieveExcludedElements
Controls if the HTML elements excluded from rendering can be selected for detailed information retrieval. This property is true by default
Public propertyRunExtensions
Controls if the browser extensions like Flash players are executed. The default value is false and no extension is executed
(Inherited from HtmlConverterBase.)
Public propertyRunJavaScript
Controls if the JavaScript in the HTML document is executed. The default value of this property is true and the JavaScript is executed
(Inherited from HtmlConverterBase.)
Public propertySelectedHtmlElements
An array of HTML CSS selectors to select the HTML elements for which to retrieve detailed information in SelectedHtmlElementsInfo collection exposed by ConversionInfo property
Public propertySerialNumber
The serial number obtained after product purchase. This property can be set to null or can be left not set to enter evaluation mode
(Inherited from HtmlConverterBase.)
Public propertyServer
The server IP address or host name
(Inherited from HtmlConverterBase.)
Public propertyServerPassword
The password to access the HTML to PDF server if the server is password protected
(Inherited from HtmlConverterBase.)
Public propertyStartBrowserHeight
This property can be used to set the starting height in pixels of the browser. This property is ignored when the BrowserHeight property is set
(Inherited from HtmlConverterBase.)
Public propertyStopSlowScripts
Controls if the browser should interrupt slow scripts in the web page. The default value is false and the scripts are not stopped
(Inherited from HtmlConverterBase.)
Public propertyTransform3DEnabled
Controls if the 3D transformations are enabled. This property is false by default
(Inherited from HtmlConverterBase.)
Public propertyTriggerMode
The method of triggering the conversion
(Inherited from HtmlConverterBase.)
Public propertyTrimToBrowserWidth
If the HTML document cannot be entirely displayed in BrowserWidth pixels and the TrimToBrowserWidth is false then the browser window width will be automatically set to display the entire HTML document in the resulted PDF. If the HTML document cannot be entirely displayed in BrowserWidth pixels and the TrimToBrowserWidth is true then the browser window width will not be automatically set to display the entire HTML document and the HTML document will be trimmed
Public propertyWaitBeforeConvert
An additional time in seconds to wait before starting the conversion to allow more time to JavaScript to update the web page. When the property is set with a positive value the TriggerMode property is automatically set to WaitTime. This property has effect only if the TriggerMode property is WaitTime.
(Inherited from HtmlConverterBase.)
Public propertyWebGLEnabled
Controls if the WebGL is enabled. This property is false by default
(Inherited from HtmlConverterBase.)
Top
Methods

  NameDescription
Public methodConvertHtmlToFile
Converts a HTML code to a PDF file
Public methodConvertHtmlToMemory
Converts a HTML code and produces a PDF document in a memory buffer
Public methodConvertHtmlToPdfDocument
Converts a HTML code and produces a PdfDocument object that can be further modified and then saved
Public methodConvertUrlToFile
Converts a HTML document from a given URL to a PDF file
Public methodConvertUrlToMemory
Converts a HTML document from a given URL and produces a PDF document in a memory buffer
Public methodConvertUrlToPdfDocument
Converts a HTML document from a given URL and produces a PdfDocument object that can be further modified and then saved
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also

Reference