ExpertPdf Html to Pdf Converter Library
PdfConverter Class
NamespacesExpertPdf.HtmlToPdfPdfConverter
ExpertPdf Html to Pdf Converter Library
This class is the main class of the HTML to PDF Converter which offers the necessary methods to create a PDF document from a web page or from a HTML string. The generated PDF document can be saved in memory or in a file.
Declaration Syntax
C#Visual BasicVisual C++
public class PdfConverter
Public Class PdfConverter
public ref class PdfConverter
Members
All MembersConstructorsMethodsPropertiesEvents



IconMemberDescription
PdfConverter()()()()
Creates a HTML to PDF converter which will use the default width of 1024 pixels to layout the HTML document. The height of the HTML document will be automatically calculated based on the default width. Because the default width of 1024 pixels might not be enough to display entirely the HTML document or because the HTML content might be scaled down to fit the PDF document page width, the other constructors allow to specify a custom width in pixels for the HTML document.

PdfConverter(Int32)
Creates a HTML to PDF converter which will automatically calculate the height of the HTML document based on the specified width. The width in pixels of the HTML document is specified by the htmlDocWidthPx parameter. If this parameter is set to 0 or a negative value, the width of the HTML document will be automatically calculated. Because all the dimensions in the PDF document are measured in points (1 point is 1/72 inch), it might be necessary pixels to transform pixels to points and points to pixels using the UnitsConverter class in order to better control the HTML to PDF conversion.

PdfConverter(Int32, Int32)
Creates a HTML to PDF converter using the specified width and height in pixels for the HTML document. The width in pixels of the HTML document is specified by the htmlDocWidthPx parameter. If this parameter is set to 0 or a to negative value, the width of the HTML document will be automatically calculated. The height in pixels of the HTML document is specified by the htmlDocHeightPx parameter. The HTML document will be truncated if its height exceeds the htmlDocHeightPx value. If this parameter is set to 0 or a negative value, the whole HTML document will be converted to PDF. Because all the dimensions in the PDF document are measured in points (1 point is 1/72 inch), it might be necessary to transform pixels to points and points to pixels using the UnitsConverter class in order to better control the HTML to PDF conversion.

ActiveXEnabled
Enable ActiveX (like Flash player) when converting HTML to a PDF with selectable text. By default this property is false. This property has effect only when generating a PDF with selectable text (PdfDocumentOptions.GenerateSelectablePdf is true). Note: This is used only by the IE rendering engine.

ActiveXEnabledInImage
Enable ActiveX (like Flash player ) when converting HTML to a PDF with embedded image. By default this property is true. This property has effect only when generating a PDF with embedded image. (PdfDocumentOptions.GenerateSelectablePdf is false). Note: This is used only by the IE rendering engine.

AddPadding
Add a padding at the end of the generated PDF document. By default this property is false.

AdjustBorderSize
There are situations when a fraction of the right and bottom borders of an image or table cell are overwritten by the image content or table cell background when the PDF document is viewed with Adobe Reader. The AdjustBorderSize value is subtracted from the background width and height. The default value is 0 points.

AlphaBlendEnabled
Enables or disables alpha blending for transparent images. Default is true.

AuthenticationOptions
Optionally set this object Username and Password properties to authenticate to the web server before accessing the URL to be converted (e.g handles Integrated Windows Authentication with IIS).

AvoidImageBreak
When true this property instructs the converter to try to avoid cutting off the images between PDF pages. By default this property is false.

AvoidTextBreak
When true this property instructs the converter to try to avoid cutting off the text between PDF pages. By default this property is true. This property has effect only when generating a PDF with selectable text (PdfDocumentOptions.GenerateSelectablePdf is true).

BatchConversion
Set this true when using the converter for batch conversion. By default this property is false.

BeforeCreateNextPageEvent
This event is raised when the next page is about to be created to continue rendering. The element rendering can be cancelled from the event handler of this event.

BeforeRenderNextPageEvent
This is event is raised before rendering the content on a page, including the intial page. The element rendering can be cancelled from the event handler of this event.

BehaviorsEnabled
Enable behaviors when rendering HTML to PDF. By default this property is false.

BinaryBehaviorsEnabled
Enable binary behaviors when rendering HTML to PDF. By default this property is false.

BkgTransparency
Modify background transparency. 0 means transparent, 100 means opaque.

CacheFolder
Use this property to enable caching of web requests. Sets the full path of the local cache folder. Note: This is used only by the WebKit rendering engine.

ClipHtmlView
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 width is given by the PageWidth property. The default value of this property is false. Note: This is used only by the WebKit rendering engine.

ColorSpace
Gets or sets the color space of the generated PDF document. The possible values are RGB, CMYK or Gray Scale. The default color space is RGB.

ConversionDelay
An additional time in seconds to wait for asynchronous items to be loaded. A delay is necessary for example to allow a Flash movie to start before starting conversion.

ConversionSummary
Offers summary information about the conversion process. After a successfull conversion this property is initialized with an instance of the ConversionSummary class. If the conversion failed this property returns a null value.

DrawBackground
Gets or sets a flag indicating if the HTML page background is rendered in PDF. Default value is true. Setting this property to false can make visible the existing PDF content behind this element.

DrawTextInsideRectangle
Internal use only.

DrawTransparenciesThreshold
Internal use.

Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
ExternalSampling
Internal use only.

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.)
GetPageCount(String)
A fast method to obtain the page count of a specified PDF document.

GetPageCount(Stream)
A fast method to obtain the page count of a specified PDF document.

GetPdfBytesFromHtmlFile(String)
Converts the specified HTML file to PDF and returns the rendered PDF document as an array of bytes.

GetPdfBytesFromHtmlFile(String, String)
Converts the specified HTML file to PDF and returns the rendered PDF document as an array of bytes.

GetPdfBytesFromHtmlStream(Stream, Encoding)
Converts the HTML string read from the specified HTML stream to PDF and returns the rendered PDF document as an array of bytes. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStream method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfBytesFromHtmlStream(Stream, Encoding, String)
Converts the HTML string read from the specified HTML stream to PDF and returns the rendered PDF document as an array of bytes. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the htmlStream parameter. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStream method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfBytesFromHtmlStream(Stream, Encoding, String, String)
Converts the HTML string read from the specified HTML stream to PDF and returns the rendered PDF document as an array of bytes.

GetPdfBytesFromHtmlStreamWithTempFile(Stream, Encoding)
Converts the HTML string read from the specified HTML stream to PDF and returns the rendered PDF document as an array of bytes. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStreamWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfBytesFromHtmlStreamWithTempFile(Stream, Encoding, String)
Converts the HTML string read from the specified HTML stream to PDF and returns the rendered PDF document as an array of bytes. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the htmlStream parameter. /// Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStream method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfBytesFromHtmlStreamWithTempFile(Stream, Encoding, String, String)
Converts the HTML string read from the specified HTML stream to PDF and returns the rendered PDF document as an array of bytes. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF.

GetPdfBytesFromHtmlString(String)
Converts the specified HTML string to PDF and returns the rendered PDF document as an array of bytes. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the internal links, the internal links might not be correctly converted. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlString method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfBytesFromHtmlString(String, String)
Converts the specified HTML string to PDF and returns the rendered PDF document as an array of bytes. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the HTML string. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlString method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfBytesFromHtmlString(String, String, String)
Converts the specified HTML string to PDF and returns the rendered PDF document as an array of bytes.

GetPdfBytesFromHtmlStringWithTempFile(String)
Converts the specified HTML string to PDF and returns the rendered PDF document as an array of bytes. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStringWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfBytesFromHtmlStringWithTempFile(String, String)
Converts the specified HTML string to PDF and returns the rendered PDF document as an array of bytes. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the HTML string. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStringWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfBytesFromHtmlStringWithTempFile(String, String, String)
Converts the specified HTML string to PDF and returns the rendered PDF document as an array of bytes. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF.

GetPdfBytesFromUrl(String)
Converts the specified URL into a PDF document and returns the rendered PDF document as an array of bytes. This method can be used to perform HTML to PDF conversion in internal memory.

GetPdfBytesFromUrl(String, String)
Converts the specified URL into a PDF document and returns the rendered PDF document as an array of bytes. This method can be used to perform HTML to PDF conversion in internal memory.

GetPdfDocumentObjectFromHtmlFile(String)
Gets a Document object representing the result of conversion of the specified HTML file to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion.

GetPdfDocumentObjectFromHtmlFile(String, String)
Gets a Document object representing the result of conversion of the specified HTML file to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion.

GetPdfDocumentObjectFromHtmlStream(Stream, Encoding)
Gets a Document object representing the result of conversion of the HTML string read from the specified HTML stream to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStream method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfDocumentObjectFromHtmlStream(Stream, Encoding, String)
Gets a Document object representing the result of conversion of the HTML string read from the specified HTML stream to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the htmlStream parameter. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStream method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfDocumentObjectFromHtmlStream(Stream, Encoding, String, String)
Gets a Document object representing the result of conversion of the HTML string read from the specified HTML stream to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion.

GetPdfDocumentObjectFromHtmlStreamWithTempFile(Stream, Encoding)
Gets a Document object representing the result of conversion of the HTML string read from the specified HTML stream to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStreamWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfDocumentObjectFromHtmlStreamWithTempFile(Stream, Encoding, String)
Gets a Document object representing the result of conversion of the HTML string read from the specified HTML stream to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the htmlStream parameter. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStream method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfDocumentObjectFromHtmlStreamWithTempFile(Stream, Encoding, String, String)
Gets a Document object representing the result of conversion of the HTML string read from the specified HTML stream to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF.

GetPdfDocumentObjectFromHtmlString(String)
Gets a Document object representing the result of conversion of the specified HTML string to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the internal links, the internal links might not be correctly converted. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlString method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfDocumentObjectFromHtmlString(String, String)
Gets a Document object representing the result of conversion of the specified HTML string to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the HTML string. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlString method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfDocumentObjectFromHtmlString(String, String, String)
Gets a Document object representing the result of conversion of the specified HTML string to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion.

GetPdfDocumentObjectFromHtmlStringWithTempFile(String)
Gets a Document object representing the result of conversion of the specified HTML string to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStringWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfDocumentObjectFromHtmlStringWithTempFile(String, String)
Gets a Document object representing the result of conversion of the specified HTML string to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the HTML string. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStringWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

GetPdfDocumentObjectFromHtmlStringWithTempFile(String, String, String)
Gets a Document object representing the result of conversion of the specified HTML string to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF.

GetPdfDocumentObjectFromUrl(String)
Gets a Document object representing the result of conversion of the specified URL to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion.

GetPdfDocumentObjectFromUrl(String, String)
Gets a Document object representing the result of conversion of the specified URL to PDF. The resulted Document object can be modified and saved to a file, to a stream, to a memory buffer or to a HTTP response. The Document object must be closed after save to release the system resources used during conversion.

GetPdfFromUrlBytes(String)
Converts the specified URL into a PDF document and returns the rendered PDF document as an array of bytes. This method can be used to perform HTML to PDF conversion in internal memory. This method is obsolete and it was preserved for backward compatibility. It offers the same functionality as the GetPdfBytesFromUrl method which is the preferred method now.

GetType()()()()
Gets the type of the current instance.
(Inherited from Object.)
HtmlDocumentInfo
Gets an object populated after conversion with the title, keywords, and description of the converted HTML document. This information can be used for example in the PostConvertActionEvent handler to set the corresponding fields of the PdfDocumentInfo object.

HtmlElementsMappingOptions
Gets a reference to the object controlling the retrieval of HTML elements position in the generated PDF. In order to retrieve the position in PDF for a list of HTML elements, the HtmlElementIds and HtmlTagNames properties of HtmlElementsMappingOptions must be set with an array of strings containing the HTML IDs and tag names of the HTML elements. The positions of the HTML elements in the generated PDF document will be returned in the HtmlElementsMappingResult object.

HtmlExcludedRegionsOptions
Gets a reference to the object controlling the exclusion of HTML elements from rendering to PDF. In order to exclude from PDF for a list of HTML elements, the HtmlElementIds and HtmlTagNames properties of HtmlExcludedRegionsOptions must be set with an array of strings containing the HTML IDs or tag names of the HTML elements excluded from conversion to PDF.

HttpCookies
Gets a collection of custom HTTP cookies to be sent by the 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 HttpCookies property. Note: This is used only by the WebKit rendering engine.

HttpHeaders
Gets a collection of custom HTTP headers to be sent by the 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 HttpHeaders property. The custom HTTP headers can be used to define cookies, authentication options, URL referer or any other HTTP header to be sent to the web browser. The preferred method to send cookies is to use the HttpCookies property. Note: This is used only by the WebKit rendering engine.

HttpRequestHeaders
Gets or sets a string containing the HTTP headers sent by the convertor to the web server when the web page is requested from a URL. The HTTP headers string can be used to define cookies, authentication options, URL referer or any other HTTP header to be sent to the web browser. Note: This is used only by the IE rendering engine.

ImgTransparency
Modify images transparency. 0 means transparent, 100 means opaque.

InternalFileName
Sets the full path of the helper file. Note: This is used only by the WebKit rendering engine.

InternetSecurityZone
Specifies the internet security zone settings used by the HTML converter to convert web sites. LocalMachine security zone offers most of the rights during conversion.

LayoutHtmlTimeoutSec
This static parameter gives the maximum time in seconds necessary to layout a HTML document. The default value is 10 minutes.

LicenseKey
Gets or sets the license key string received from the vendor. If this property is null the converter will automatically enter in evaluation mode and a demo watermark is displayed on the generated PDF document.

LoadHtmlConcurrencyLevel
This static parameter gives the maximum number of threads in the current process that can download and execute HTML documents simultaneously. This parameter must be set before the first conversion performed in the current process. When this parameter is 0 or negative and SerializeLoadHtml is false the concurrency level is the maximum value.

MaskBltEnabled
Enables or disables masking for transparent images. Default is true.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
NavigationTimeout
The navigation timeout in seconds. Default value is 60. You can increase this timeout is you have a very slow network or when you convert a very big file.

OptimizeMemoryUsage
When this property is true the library will try to release the unused memory as soon as possible. The default value is false.

OptimizePdfPageBreaks
A flag indicating if the converter uses an optimized page breaks algorithm to improve document scrolling inside a PDF Viewer. The optimized algorithm can introduce a small additional processing time when the PDF document is generated.

PageHeight
Gets or sets the height of the HTML document in pixels. The HTML documentwill be truncated if its height exceeds the specified value of this property. If this parameter is set to 0 or a negative value, the whole HTML document will be converted to PDF. Because all the dimensions in the PDF document are measured in points (1 point is 1/72 inch), it might be necessary to transform pixels to points and points to pixels using the UnitsConverter class in order to better control the HTML to PDF conversion.

PageWidth
Gets or sets the width of the HTML document in pixels. The default width is 1024 pixels and this value can be changed by setting this property or by specifying the htmlDocWidthPx parameter in the constructor. If this property is set to 0 or a to negative value, the width of the HTML document will be automatically calculated. Because all the dimensions in the PDF document are measured in points (1 point is 1/72 inch), it might be necessary to transform pixels to points and points to pixels using the UnitsConverter class in order to better control the HTML to PDF conversion.

PdfBookmarkOptions
Gets a reference to the object controlling the bookmarks creation for the rendered PDF document. In order to enable creation of bookmarks you have to set the TagNames property of PdfBookmarkOptions with the names of the HTML tags you want to bookmark.

PdfConverterConcurrencyLevel
This static parameter gives the maximum number of threads in the current .NET application domain that can convert HTML to PDF simultaneously. This parameter must be set before the first conversion performed in the current application domain. When this property is set with a negative value or zero the concurrency level is maximum. The default value is 4.

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. This property can be used to control the PDF document margins, PDF compression level, JPEG compression level, the PDF page size and orientation, the PDF document headers and footers, conversion of the URLs to links in PDF, conversion of the HTML links with anchors to internal PDF links, true type fonts embedding, fit width and stretch to fit, conversion to a single PDF page, append or prepend external PDF documents.

PdfFooterOptions
Gets a reference to an object to control the generated PDF document footer options. The footer is displayed in the generated PDF document if the PdfDocumentOptions.ShowFooter property is true.

PdfHeaderOptions
Gets a reference to an object to control the generated PDF document header options. The header is displayed in the generated PDF document if the PdfDocumentOptions.ShowHeader property is true.

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.

PdfStandardSubset
Defines the PDF subset used by the generated PDF. The default value is Full. This property can be used to instruct the converter to generate PDF/A, PDF/X or PDF/SiqQ compliant documents.

PdfViewerPreferences
Gets a reference to the object controlling how the generated PDF is displayed by the PDF viewer.

PluginsEnabled
A flag indicating if plugins are enabled in converter. The default is true. Note: This is used only by the WebKit rendering engine.

PostConvertActionEvent
A event raised by converter before saving the document. The argument of this event offers access to the PDF document created by the converter. The PDF document can be further customized by adding new pages, texts, images, other HTML documents, bookmarks, links, digital signatures, templates and watermarks.

ProxyOptions
Gets a reference to an object encapsulating the proxy options used to access the HTML document to convert. Note: This is used only by the WebKit rendering engine.

RenderElementId
Use this property to convert only a certain section of the page, specified by the html element ID. Note: This is used only by the WebKit rendering engine.

RenderingEngine
Gets or sets the rendering engine used by the converter to load and render the html. The possible values are WebKit and IE. The Webkit rendering engine is internal and renders similar to Chrome and Safari. For IE, the component uses the IE engine from the machine.

RightToLeftEnabled
This property is obsolete. Setting this property is not necessary anymore when converting pages in right-to-left languages like Hebrew or Arabic.

SampleHtmlString
Internal use only.

SamplingEnabled
Internal use only.

SamplingModeAuto
Internal use only.

SavePdfFromHtmlFileToFile(String, String)
Converts the specified HTML file into a PDF document and saves the rendered PDF document into the specified disk file.

SavePdfFromHtmlFileToFile(String, String, String)
Converts the specified HTML file into a PDF document and saves the rendered PDF document into the specified disk file.

SavePdfFromHtmlFileToStream(String, Stream)
Converts the specified HTML file to PDF and saves the rendered PDF document to the specified stream.

SavePdfFromHtmlFileToStream(String, String, Stream)
Converts the specified HTML file to PDF and saves the rendered PDF document to the specified stream.

SavePdfFromHtmlStreamToFile(Stream, Encoding, String)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document into the specified disk file. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the SavePdfFromHtmlStreamToFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStreamToFile(Stream, Encoding, String, String)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document into the specified disk file. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the htmlStream parameter. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the SavePdfFromHtmlStreamToFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStreamToFile(Stream, Encoding, String, String, String)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document into the specified disk file.

SavePdfFromHtmlStreamToFileWithTempFile(Stream, Encoding, String)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document into the specified disk file. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the SavePdfFromHtmlStreamToFileWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStreamToFileWithTempFile(Stream, Encoding, String, String)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document into the specified disk file. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the htmlStream parameter. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the SavePdfFromHtmlStreamToFileWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStreamToFileWithTempFile(Stream, Encoding, String, String, String)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document into the specified disk file. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF.

SavePdfFromHtmlStreamToStream(Stream, Encoding, Stream)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document to the specified stream. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStream method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStreamToStream(Stream, Encoding, String, Stream)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document to the specified stream. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the htmlStream parameter. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStream method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStreamToStream(Stream, Encoding, String, String, Stream)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document to the specified stream.

SavePdfFromHtmlStreamWithTempFileToStream(Stream, Encoding, Stream)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document to the specified stream. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStreamWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStreamWithTempFileToStream(Stream, Encoding, String, Stream)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document to the specified stream. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the htmlStream parameter. /// Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStream method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStreamWithTempFileToStream(Stream, Encoding, String, String, Stream)
Converts the HTML string read from the specified HTML stream to PDF and saves the rendered PDF document to the specified stream. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF.

SavePdfFromHtmlStringToFile(String, String)
Converts the specified HTML string to PDF and saves the rendered PDF document into the specified disk file. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the SavePdfFromHtmlStringToFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStringToFile(String, String, String)
Converts the specified HTML string to PDF and saves the rendered PDF document into the specified disk file. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the HTML string. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the SavePdfFromHtmlStringToFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStringToFile(String, String, String, String)
Converts the specified HTML string to PDF and saves the rendered PDF document into the specified disk file.

SavePdfFromHtmlStringToFileWithTempFile(String, String)
Converts the specified HTML string to PDF and saves the rendered PDF document into the specified disk file. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the SavePdfFromHtmlStringToFileWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStringToFileWithTempFile(String, String, String)
Converts the specified HTML string to PDF and saves the rendered PDF document into the specified disk file. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the HTML string. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the SavePdfFromHtmlStringToFileWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStringToFileWithTempFile(String, String, String, String)
Converts the specified HTML string to PDF and saves the rendered PDF document into the specified disk file. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF.

SavePdfFromHtmlStringToStream(String, Stream)
Converts the specified HTML string to PDF and saves the rendered PDF document to the specified stream. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the internal links, the internal links might not be correctly converted. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlString method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStringToStream(String, String, Stream)
Converts the specified HTML string to PDF and saves the rendered PDF document to the specified stream. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the HTML string. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlString method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStringToStream(String, String, String, Stream)
Converts the specified HTML string to PDF and saves the rendered PDF document to the specified stream.

SavePdfFromHtmlStringWithTempFileToStream(String, Stream)
Converts the specified HTML string to PDF and saves the rendered PDF document to the specified stream. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. This method does not use any URL base and therefore the images or CSS files referenced by relative URLs in the HTML string cannot be resolved by the converter to a full URL. Also, because this method does not specify the full URL of the document referenced by the links with anchors, all the links with anchors are considered to be internal links. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStringWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStringWithTempFileToStream(String, String, Stream)
Converts the specified HTML string to PDF and saves the rendered PDF document to the specified stream. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF. The urlBase parameter allows the converter to determine the full URLs from relative URLs for images and CSS files appearing in the HTML string. Because this method does not specify the full URL of the document referenced by the internal links, the urlBase will be used by default. To make sure the the external resources referenced by relative URLs and the internal links with anchors are correctly resolved by the converter, the GetPdfBytesFromHtmlStringWithTempFile method with the urlBase and internalLinksDocUrl additional parameters can be used.

SavePdfFromHtmlStringWithTempFileToStream(String, String, String, Stream)
Converts the specified HTML string to PDF and saves the rendered PDF document to the specified stream. The HTML string is first saved into a temporary HTML file. The temporary HTML file is then converted PDF.

SavePdfFromUrlToFile(String, String)
Converts the specified URL into a PDF document and saves the rendered PDF document into the specified disk file.

SavePdfFromUrlToFile(String, String, String)
Converts the specified URL into a PDF document and saves the rendered PDF document into the specified disk file.

SavePdfFromUrlToStream(String, Stream)
Converts the specified URL into a PDF document and saves the rendered PDF document to the specified stream.

SavePdfFromUrlToStream(String, String, Stream)
Converts the specified URL into a PDF document and saves the rendered PDF document to the specified stream.

ScriptsEnabled
Enable scripts (JavaScript) when converting HTML to a PDF with selectable text. By default this property is true. This property has effect only when generating a PDF with selectable text (PdfDocumentOptions.GenerateSelectablePdf is true).

ScriptsEnabledInImage
Enable scripts (JavaScript) when converting HTML to a PDF with embedded image. By default this property is true. This property has effect only when generating a PDF with embedded image. (PdfDocumentOptions.GenerateSelectablePdf is false).

SerializeLoadHtml
This static flag indicates if the download and execution of the HTML code is serialized when the converter is called simultaneously from multiple threads of an application. This parameter must be set before the first conversion performed in the current process. Default value is false.

SplitThreshold
Internal use.

StartupMode
Use this property to specify the converter startup mode. By default this is set to Automatic and the conversion is started as soon as the page loads (and ConversionDelay elapses). If set to Manual, the conversion is started only by a javascript call to ExpertPdfJSObj.startConversion() Note: This is used only by the WebKit rendering engine.

StartupScript
Use this property to specify some JavaScript code that will be injected into the page that is converted. The JavaScript code specified here will run before any other script on the page. Note: This is used only by the WebKit rendering engine.

ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
TransparencyEnabled
Gets or sets a flag indicating if the transparency is enabled in the generated PDF document. Default value is true. This property can be set to false to eliminate the additional flattening time when the document is sent to the printer from Adobe Reader viewer.

TruncateOutOfBoundsText
Internal use only.

UseCrossRefStreams
When this property is true, the generated PDF will store the PDF cross-reference table and PDF trailer in compressed cross-reference streams and therefore the generated PDF document will be smaller in size. Set this false for compatibility with third party tools unable to understand the cross-reference streams. The default value is false.

UseGlyphs
A flag indicating if texts are rendered using glyphs or regular characters. The default is false and regular characters are used if possible. Glyphs are forced for special languages (such as right to left or Asian). Note: This is used only by the WebKit rendering engine.

UsePrintCSSMediaType
A flag indicating if @media print css styles are used or not. The default is false and @media screen css styles are used. Note: This is used only by the WebKit rendering engine.

xDf
Internal use only

Inheritance Hierarchy
Object
PdfConverter

Assembly: ExpertPdf.HtmlToPdf (Module: ExpertPdf.HtmlToPdf.dll) Version: 9.2.0.25824 (9.2.0.0)