Click or drag to resize

HtmlToPdfElement Properties

The HtmlToPdfElement type exposes the following members.

Properties
 NameDescription
Public propertyActiveXEnabled Enable ActiveX when rendering HTML to selectable PDF. Default is false. Note: This is used only by the IE rendering engine.
Public propertyActiveXEnabledInImage Enable ActiveX when rendering HTML to image. Default is true. Note: This is used only by the IE rendering engine.
Public propertyActualText The exact text this element represents, for content that cannot be extracted as text (for example text drawn as a graphic). Only used when TagType is set.
(Inherited from PageElement)
Public propertyAddPadding Add padding at the end of the conversion result. Default is false.
Public propertyAdjustBorderSize 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.
Public propertyAllowContentHeightResize A flag used by the WebKit2, Blink and Chromium engines indicating if the content height can be recalculated to better fit the page. This can introduce certain errors in some cases.
Public propertyAllowLocalAccess A flag indicating if local files can be loaded during the conversion. The default value is True and local files can be loaded.
Public propertyAlphaBlendEnabled Enables or disables alpha blending for transparent images. Default is true.
Public propertyAlternateText The alternate text describing this element, used by assistive technology. Required for Figure elements in a tagged document. Only used when TagType is set.
(Inherited from PageElement)
Public propertyArtifact Marks this element as decorative content (an artifact) in a tagged document: it is left out of the structure tree. Takes precedence over TagType. Has no effect when the document is not tagged.
(Inherited from PageElement)
Public propertyAuthenticationOptions Server authentication options (e.g IIS authentication)
Public propertyAvoidImageBreak When true this property instructs the converter to try to avoid cutting off the images between PDF pages
Public propertyAvoidTextBreak When true this property instructs the converter to try to avoid cutting off the text between PDF pages
Public propertyBackColor Gets or sets element background color.
(Inherited from PageGraphicElement)
Public propertyBatchConversion Set this true when using the converter for batch conversion in a loop
Public propertyBehaviorsEnabled Enable behaviors when rendering HTML to image. Default is false.
Public propertyBinaryBehaviorsEnabled Internal use. Default is false.
Public propertyBkgTransparency Modify background transparency. 0 means transparent, 100 means opaque.
Public propertyBlending Gets or sets blending mode for transparent rendering mode of the element.
(Inherited from PageGraphicElement)
Public propertyCacheFolder 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.
Public propertyCefEnginePath Gets or sets the full path of the directory containing the ExpertPdf.Cef.exe binary.
Public propertyCefEngineTemporaryFilesPath Gets or sets the full path of a folder where the Chromium rendering engine will write temporary files.
Public propertyClickElementsDelayAfter Delay in miliseconds, after element click.
Public propertyClickElementsDelayBefore Delay in miliseconds, before element click.
Public propertyClickElementsSelectors Specifies elements from the web page that will be clicked before converting the page.
Public propertyClipHtmlView 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 HtmlViewerWidth property. The default value of this property is false. With the Blink and Chromium rendering engines the width is handled the same way whether this is set or not; when this property is true and a height is set with the HtmlViewerHeight property, they render the HTML viewer at that fixed height and leave the content below it out of the generated PDF (the WebKit engine fixes both the width and the height). With a height of 0 the Blink and Chromium engines ignore this property.
Public propertyColorSpace Gets or sets color space for element rendering.
(Inherited from PageGraphicElement)
Public propertyConsoleLog Returns the console log of the browser used to render the web page.
Public propertyConversionDelay An additional time in seconds to wait for asynchronous items to be loaded
Public propertyCustomCSS Use this property to specify some CSS styles that will be injected into the page that is converted.
Public propertyDrawBackground 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.
Public propertyDrawTextInsideRectangle Internal use only.
Public propertyDrawTransparenciesThreshold Internal use.
Public propertyEmbedFonts When true this options instructs the converter to embed all the true type fonts into the PDF document. The default value is false.
Public propertyExternalSampling Internal use only
Public propertyFitHeight When this property is true the HTML content will be resized if necessary to fit the available height in PDF page. By default this property is false.
Public propertyFitWidth When this property is true the HTML content will be resized if necessary to fit the available width in PDF page. When false the HTML content will be rendered at the real size. By default this property is true and the content will be resized if necessary to fit the available width in PDF page.
Public propertyFontTempFolder Use this property to specify the path where temporary font files are saved. If this is not specified, the system temporary folder is used. Note: This is used only by the WebKit rendering engine.
Public propertyForeColor Gets or sets the element foreground color.
(Inherited from PageGraphicElement)
Public propertyGradient The gradient used to fill a shape.
(Inherited from PageGraphicElement)
Public propertyHtmlDocumentInfo Gets an object populated after conversion with the title, keywords, and description of the converted HTML document.
Public propertyHtmlElementsMappingOptions 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 after the element was added to the page.
Public propertyHtmlExcludedRegionsOptions 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.
Public propertyHtmlViewerHeight Gets or sets the HTML viewer height in pixels. If the viewer width was not set, this property has no effect
Public propertyHtmlViewerWidth Gets or sets the HTML viewer width in pixels
Public propertyHttpCookies 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.
Public propertyHttpHeaders 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.
Public propertyHttpPostParameters Gets the collection of custom HTTP POST parameters used for the conversion.
Public propertyHttpRequestHeaders 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.
Public propertyImgTransparency Modify images transparency. 0 means transparent, 100 means opaque.
Public propertyInternalFileName Sets the full path of the helper file. Note: This is used only by the WebKit rendering engine.
Public propertyInternalLinksEnabled When true this options instructs the converter to convert the internal HTML links to internal PDF links. The default value is true.
Public propertyInternetSecurityZone Specifies the internet security zone settings used by the HTML converter to convert web sites.
Public propertyStatic memberLayoutHtmlTimeoutSec This static parameter gives the maximum time in seconds necessary to layout a HTML document. The default value is 10 minutes.
Public propertyLazyImagesLoadingDelay Delay per page, in miliseconds, for lazy images loading.
Public propertyLazyImagesLoadingEnabled Enables a delay mechanism to allow images to fully load.
Public propertyLineStyle Gets or sets the line style for elements rendering lines.
(Inherited from PageGraphicElement)
Public propertyLiveUrlsEnabled When true this options instructs the converter to convert the HTML links in PDF links. The default value is true.
Public propertyStatic memberLoadHtmlConcurrencyLevel 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.
Public propertyLoginOptions Handle custom page login.
Public propertyManagedContentTrimming Gets or sets whether the library decides where the rendered content of this element ends. Used only by the Chromium engine. The default is True.
Public propertyManagedContentTrimmingMode Gets or sets how the rendering engine reports where the rendered content ends when ManagedContentTrimming is True. Used only by the Chromium engine. The default is Ink.
Public propertyMaskBltEnabled Enables or disables masking for transparent images. Default is true.
Public propertyMaxConversionTime The maximum time in seconds the conversion of this element may take after the page has loaded. Default value is 60.
Public propertyNavigationTimeout The navigation timeout in seconds. Default value is 60.
Public propertyOptimizeMemoryUsage When this property is true the library will try to release the unused memory as soon as possible. The default value is false.
Public propertyOptimizePdfPageBreaks 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.
Public propertyPaginate When true the element can be paginated
Public propertyPdfBookmarkOptions 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.
Public propertyPluginsEnabled A flag indicating if plugins are enabled in converter. The default is true. Note: This is used only by the WebKit rendering engine.
Public propertyPostLoadingScript Use this property to specify some JavaScript code that will be injected into the page that is converted and executed after the page was fully loaded.
Public propertyPostLoadingScriptDelayAfter Delay in miliseconds, after post page loading javascript injection.
Public propertyProxyOptions 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.
Public propertyRenderedPagesRectangles The bounds of the rendered rectangle on each PDF page. This property is assigned after the element has been added to a PDF page.
Public propertyRenderElementId 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.
Public propertyRenderElementSelector Use this property to convert only the part of the page matched by this CSS selector.
Public propertyRenderingEngine Gets or sets the rendering engine used to load and render the HTML: Chromium (the engine of the Chrome browser, recommended for modern pages; needs the Chromium engine files), Blink (in the .NET Framework 4.6.1+ and .NET Core builds; needs the Blink engine files), WebKit (built in, the default) or WebKit2 (for restricted environments).
Public propertyRenderOnTimeout A flag indicating if the page is rendered even if a navigation timeout occurs. The default value is false and a navigation timeout exception is raised. Note: This is used by the WebKit and Chromium rendering engines.
Public propertyResizeImages A flag indicating if the images from the web page can be resized to optimize memory usage. Note: This is used only by the WebKit rendering engine.
Public propertyRightToLeftEnabled This property is obsolete. Setting this property is not necessary anymore when converting pages in right-to-left languages like Hebrew or Arabic.
Public propertyRotated A flag to indicate if this element was rotated.
(Inherited from PageGraphicElement)
Public propertySampleHtmlString Internal use only
Public propertySamplingEnabled Internal use only
Public propertySamplingModeAuto Internal use only
Public propertyScaled A flag to indicate if this element was scaled.
(Inherited from PageGraphicElement)
Public propertyScriptsEnabled Enable scripts when rendering HTML to selectable PDF. Default is true.
Public propertyScriptsEnabledInImage Enable scripts when rendering HTML to image. Default is true.
Public propertySecureProtocol Protocol used for secure (HTTPS) connections.
Public propertyStatic memberSerializeLoadHtml 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.
Public propertyShowFooterOnEvenPages Show or not the document footer on even pages generated by this element. By default the footer is displayed both on odd and even pages.
Public propertyShowFooterOnOddPages Show or not the document footer on odd pages generated by this element. By default the footer is displayed both on odd and even pages. The ShowFooterTemplate property of the page to which this element is added has priority over ShowFooterOnOddPages.
Public propertyShowHeaderOnEvenPages Show or not the document header on even pages generated by this element. By default the header is displayed both on odd and even pages.
Public propertyShowHeaderOnOddPages Show or not the document header on odd pages generated by this element. By default the header is displayed both on odd and even pages. The ShowHeaderTemplate property of the page to which this element is added has priority over ShowHeaderOnOddPages.
Public propertySkewed A flag to indicate if this element was skewed.
(Inherited from PageGraphicElement)
Public propertySplitThreshold Internal use.
Public propertyStartupMode 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.
Public propertyStartupScript 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.
Public propertyStretchToFit This property has effect only when FitWidth property is true. When FitWidth is true and this property is true the HTML content will be stretched if necessary to fit the available width in PDF page. By default this property is false and the content will not be stretched to fit the available width in PDF page.
Public propertyTagged Produce tagged, accessible (PDF/UA) logical structure from the rendered content of this HTML element. The structure (headings, paragraphs, lists, tables, figures, links, reading order) comes from the rendering engine's tagged output and is added to the document structure tree.
Public propertyTagType The logical structure type of this element in a tagged document (see Tagged). When set, the element content is added to the document structure tree with this type.
(Inherited from PageElement)
Public propertyTranslated A flag to indicate if this element was translated.
(Inherited from PageGraphicElement)
Public propertyTransparency Gets or sets element transparency. The transparency is expressed as a value between 0 and 100. 0 means completely transparent and 100 completely opaque.
(Inherited from PageGraphicElement)
Public propertyTruncateOutOfBoundsText Internal use only.
Public propertyUseFontTempFolder Use this property to specify if the web fonts are kept in memory or on the disk in a temporary file. Note: This is used only by the WebKit rendering engine.
Public propertyUseGlyphs 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.
Public propertyUsePrintCSSMediaType 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.
Public propertyWebGlEnabled Controls WebGL support in the rendering engine.
Top
See Also