Package com.winnovative_software
Class HtmlToPdfElement
java.lang.Object
com.winnovative_software.PageElement
com.winnovative_software.PageGraphicElement
com.winnovative_software.HtmlToPdfElement
- Direct Known Subclasses:
HtmlToPdfVariableElement
This class encapsulates a HTML to PDF converter functionality. Objects of
this class can be added at any location in a PDF page or Template to render
HTML. The conversion is performed when the element is added to a page or
Template
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The default virtual browser height in pixels is set to autodetect the HTML content height.static final int
The default width in PDF of the element is set to available width in PDF page.static final int
The default width in PDF of the element is set to available width in PDF page.static final int
The default virtual browser width in pixels -
Constructor Summary
ConstructorsConstructorDescriptionHtmlToPdfElement
(float x, float y, float width, float height, String urlToConvert) Creates an URL to PDF converter element at the specified x and y coordinates with the specified width and heightHtmlToPdfElement
(float x, float y, float width, float height, String urlToConvert, int htmlViewerWidth, int htmlViewerHeight) Creates a URL to PDF converter element at the specified x and y coordinates with the specified width and height using a document URL to resolve the internal links.HtmlToPdfElement
(float x, float y, float width, float height, String htmlStringToConvert, String htmlStringBaseURL) Creates a HTML string to PDF converter element at the specified x and y coordinates with the specified width and height using a base URL to resolve the external resources and a document URL to resolve the internal linksHtmlToPdfElement
(float x, float y, float width, float height, String htmlStringToConvert, String htmlStringBaseURL, int htmlViewerWidth, int htmlViewerHeight) Creates a HTML string to PDF converter element at the specified x and y coordinates with the specified width and height using a base URL to resolve the external resources and a document URL to resolve the internal links.HtmlToPdfElement
(float x, float y, float width, String urlToConvert) Creates an URL to PDF converter element at the specified x and y coordinates with the specified width.HtmlToPdfElement
(float x, float y, float width, String urlToConvert, int htmlViewerWidth) Creates an URL to PDF converter element at the specified x and y coordinates with the specified width.HtmlToPdfElement
(float x, float y, float width, String htmlStringToConvert, String htmlStringBaseURL) Creates a HTML string to PDF converter element at the specified x and y coordinates with the specified width using a base URL to resolve the external resources and a document URL to resolve the internal links.HtmlToPdfElement
(float x, float y, float width, String htmlStringToConvert, String htmlStringBaseURL, int htmlViewerWidth) Creates a HTML string to PDF converter element at the specified x and y coordinates with the specified width using a base URL to resolve the external resources and a document URL to resolve the internal links.HtmlToPdfElement
(float x, float y, String urlToConvert) Creates an URL to PDF converter element at the specified x and y coordinates in PDF page.HtmlToPdfElement
(float x, float y, String htmlStringToConvert, String htmlStringBaseURL) Creates a HTML string to PDF converter element at the specified x and y coordinates in PDF page using a base URL to resolve the external resources and a document URL to resolve the internal links.HtmlToPdfElement
(String urlToConvert) Creates an URL to PDF converter element at the (0,0) location in PDF page.HtmlToPdfElement
(String htmlStringToConvert, String htmlStringBaseURL) Creates a HTML string to PDF converter element that will be rendered at the (0,0) location in PDF page using a base URL to resolve the external resources and a document URL to resolve the internal links. -
Method Summary
Modifier and TypeMethodDescriptionThis 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 PDF Converter.String[]
Gets the CSS selectors of the HTML elements to not be broken between PDF pages if possibleboolean
Gets the flag indicating if the HTML to PDF converter will try to avoid cutting off the images between PDF pagesboolean
Gets the flag indicating if the HTML to PDF converter will try to avoid cutting off the text between PDF pagesbaseUrl()
Gets the base URL of the HTML string to be converted to PDFfloat
Gets the space in points to introduce at the bottom of PDF pages where the HTML is rendered.boolean
Gets a flag indicating if the HTML content is clipped by HTML viewer window widthint
Gets the 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 PDF converter.Gets the default HTML document text encoding to be used if there is no charset meta tag defined in the HTML documentboolean
Gets the flag indicating if the HTML to PDF converter should try to download all the resourcesboolean
Gets the flag indicating if the HTML to PDF converter will embed all the true type fonts in the PDF documentboolean
Gets the flag indicating if the accelerated CSS 3D transformations are enabled in the HTML to PDF converter.boolean
Gets the flag indicating if the accelerated 2D canvas is enabled in the HTML to PDF converterboolean
Gets the flag indicating if the HTTP2 protocol is enabled in in HTML to PDF element converter.boolean
Gets the flag indicating if the persistent local storage is enabled in converterboolean
Gets the flag indicating if the WebGL is enabled in the HTML to PDF converterboolean
Gets the flag indicating the PDF graphics are rendered at the best quality in the PDF documentboolean
Gets the flag indicating if the HTML viewer extensions are executed during HTML to PDF conversionboolean
Gets the fag indicating if the HTML content will be resized if necessary to fit the available height in PDF pageboolean
fitWidth()
Gets the fag indicating if the HTML content will be resized if necessary to fit the available width in PDF pagefloat
height()
Gets the height in points of the destination rectangle in PDF page where the HTML content is renderedString[]
Gets the CSS selectors of the HTML elements to be excluded from rendering during HTML to PDF conversionhtml()
Gets the HTML string to be converted to PDFGets an object populated after conversion with the title, keywords, and description of the converted HTML documentGets a reference to the object that can be used to obtain the position in PDF of the HTML elements rendered by the HTML to PDF converter.int
Gets the HTML viewer height in pixels in the HTML to PDF converter elementint
Gets the preferred HTML viewer width in pixels in HTML to PDF converter elementint
Gets the HTML viewer zoom percentage in HTML to PDF element similar to zoom level in a browserReturns the collection of HTTP POST fields to be used when accessing a web page in HTML to PDF converter.Gets a collection of custom HTTP cookies to be sent by the HTML to PDF converter to the web server when the web page to convert and the resources (image, css, etc) referenced by the web page are requested.Gets a collection of custom HTTP headers to be sent by the HTML to PDF converter to the web server when the web page is requested from a URL.int
Gets the maximum height in pixels of an image part in HTML to PDF converterboolean
Gets the flag indicating if the images scaling is allowed in the PDF documentThe impersonation options applied during navigation in HTML to PDF converterint
Gets the initial height in pixels of the HTML viewer in HTML to PDF converterboolean
Gets the flag indicating if the HTML to PDF element will always insert a new page in the PDF document when rendering next page instead of trying to use an already existing PDF pageboolean
Gets the flag indicating if the interactive features are enabled for hidden HTML elementsboolean
Gets the flag indicating if the HTML to PDF converter to convert the internal HTML links (links with anchors) to internal PDF links in the PDF documentboolean
Gets the flag indicating if the slow JavaScript script should be interrupted in HTML to PDF converterboolean
Gets the flag indicating if JavaScript execution is enabled in HTML to PDF converterboolean
Gets the flag indicating if the HTML to PDF converter will convert the external links from HTML to PDF links in the PDF documentboolean
Gets the a flag indicating if the access to local files is enabled in the HTML to PDF elementint
Gets the additional time in seconds to wait after manual triggering before starting the rendering.int
Gets the maximum height in pixels to be rendered from the HTML document by the HTML to PDF converterGets the media type of the HTML document used by the HTML to PDF converterint
Gets the minimum height in pixels to be rendered from the HTML document by the HTML to PDF converterint
Gets the navigation timeout in secondsGets the custom user agent to be used when accessing the HTML pageboolean
Gets the flag indicating if the hidden elements are rendered in the PDF documentString[]
Gets the CSS selectors of the HTML elements after which to force a page break in PDF documentString[]
Gets the CSS selectors of the HTML elements before which to force a page break in PDF documentboolean
paginate()
Gets the flag indicating if the HTML to PDF element can be paginated to render many PDF pages if necessaryGets a reference to the object controlling the bookmarks creation for the rendered PDF document.Gets a reference to the object controlling the automatic conversion of a HTML form to a PDF form in the generated PDF documentboolean
Gets the flag indicating if the HTML to PDF converter will send the custom headers defined by thehttpRequestHeaders()
property each time an external resource (image, css, etc) referenced by the web page is requestedboolean
Gets the flag indicating if the fonts with PostScript outlines are enabled in HTML during the HTML to PDF conversionboolean
Gets the flag indicating if the HTML to PDF converter should perform a pre-renderingGets a reference to an object encapsulating the proxy options used by HTML to PDF converter to access the HTML document to convertGets the CSS selector of the HTML element to be rendered to PDF by the HTML to PDF converterGets the bounds of the rendered rectangle on each PDF page.void
setAvoidHtmlElementsBreakSelectors
(String[] selectors) Sets the CSS selectors of the HTML elements to not be broken between PDF pages if possiblevoid
setAvoidImageBreak
(boolean avoidImageBreak) Sets the flag indicating if the HTML to PDF converter will try to avoid cutting off the images between PDF pagesvoid
setAvoidTextBreak
(boolean avoidTextBreak) Sets the flag indicating if the HTML to PDF converter will try to avoid cutting off the text between PDF pages.void
setBaseUrl
(String htmlStringBaseURL) Sets the base URL of the HTML string to be converted to PDFvoid
setBottomSpacing
(float bottomSpacing) Sets the space in points to introduce at the bottom of PDF pages where the HTML is rendered.void
setClipHtmlView
(boolean clipView) Sets a flag indicating if the HTML content is clipped by HTML viewer window width.void
setConversionDelay
(int delay) Sets 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 PDF converter.void
setDefaultHtmlEncoding
(String encoding) Sets the default HTML document text encoding to be used if there is no charset meta tag defined in the HTML documentvoid
setDownloadAllResources
(boolean download) Sets the flag indicating if the HTML to PDF converter should try to download all the resources even if this could cause a slower conversion.void
setEmbedFonts
(boolean embedFonts) Sets the flag indicating if the HTML to PDF converter will embed all the true type fonts in the PDF document.void
setEnable3DTransformations
(boolean enabled) Gets or sets a flag indicating if the accelerated CSS 3D transformations are enabled in the HTML to PDF converter.void
setEnableAccelerated2DCanvas
(boolean enabled) Sets the flag indicating if the accelerated 2D canvas is enabled in the HTML to PDF converter.void
setEnableHttp2
(boolean enabled) Sets the flag indicating if the the HTTP2 protocol is enabled in in HTML to PDF element converter.void
setEnablePersistentStorage
(boolean enabled) Sets the flag indicating if the persistent local storage is enabled in converter.void
setEnableWebGL
(boolean enabled) Sets a flag indicating if the WebGL is enabled in the HTML to PDF converter.void
setEnhancedGraphicsQuality
(boolean enabled) Sets the flag indicating the PDF graphics are rendered at the best quality in the PDF document.void
setExtensionsEnabled
(boolean enabled) Sets a flag indicating if the HTML viewer extensions are executed during HTML to PDF conversion.void
setFitHeight
(boolean fitHeight) Sets the fag indicating if the HTML content will be resized if necessary to fit the available height in PDF page.void
setFitWidth
(boolean fitWidth) Sets the fag indicating if the HTML content will be resized if necessary to fit the available width in PDF page.void
setHeight
(float height) Sets the height in points of the destination rectangle in PDF page where the HTML content is rendered.void
setHiddenHtmlElementsSelectors
(String[] hiddenHtmlElementsSelectors) Sets the CSS selectors of the HTML elements to be excluded from rendering during HTML to PDF conversionvoid
Sets the HTML string to be converted to PDFvoid
setHtmlViewerHeight
(int viewerHeight) Sets the HTML viewer height in pixels in the HTML to PDF converter element.void
setHtmlViewerWidth
(int viewerWidth) Gets or sets the preferred HTML viewer width in pixels in HTML to PDF converter element.void
setHtmlViewerZoom
(int viewerZoom) Sets HTML viewer zoom percentage in HTML to PDF element similar to zoom level in a browser.void
setImagePartSize
(int height) Sets the maximum height in pixels of an image part in HTML to PDF convertervoid
setImagesScalingEnabled
(boolean enabled) Sets flag indicating if the images scaling is allowed in the PDF document.void
setInitialHtmlViewerHeight
(int initialHeight) Sets the initial height in pixels of the HTML viewer in HTML to PDF converter.void
setInsertNewPagesEnabled
(boolean insertNewPagesEnabled) Sets the flag indicating if the HTML to PDF element will always insert a new page in the PDF document when rendering next page instead of trying to use an already existing PDF page.void
setInteractiveHiddenElements
(boolean enabled) Sets the flag indicating if the interactive features are enabled for hidden HTML elements.void
setInternalLinksEnabled
(boolean enabled) Sets the flag indicating if the HTML to PDF converter to convert the internal HTML links (links with anchors) to internal PDF links in the PDF document.void
setInterruptSlowJavaScript
(boolean interrupt) Sets a flag indicating if the slow JavaScript script should be interrupted in HTML to PDF converter.void
setJavaScriptEnabled
(boolean enabled) Sets a flag indicating if JavaScript execution is enabled in HTML to PDF converter.void
setLiveUrlsEnabled
(boolean enabled) Sets the flag indicating if the HTML to PDF converter will convert the external links from HTML to PDF links in the PD.void
setLocalFilesAccessEnabled
(boolean enabled) Sets the flag indicating if the access to local files is enabled in the HTML to PDF element.void
setManualTriggeringConversionDelay
(int delay) Sets an additional time in seconds to wait after manual triggering before starting the rendering.void
setMaxHtmlViewerHeight
(int maxHeight) Sets the maximum height in pixels to be rendered from the HTML document by the HTML to PDF converter.void
setMediaType
(String media) Sets the media type of the HTML document used by the HTML to PDF converter.void
setMinHtmlViewerHeight
(int minHeight) Sets the minimum height in pixels to be rendered from the HTML document by the HTML to PDF converter.void
setNavigationTimeout
(int timeout) Sets the HTML to PDF converter navigation timeout in seconds.void
setNavigatorUserAgent
(String navigatorUserAgent) Sets the custom user agent to be used when accessing the HTML page.void
setNoSizeElementsEnabled
(boolean enabled) Sets flag indicating if the hidden elements are rendered in the PDF document.void
setPageBreakAfterHtmlElementsSelectors
(String[] selectors) Sets the CSS selectors of the HTML elements after which to force a page break in PDF documentvoid
setPageBreakBeforeHtmlElementsSelectors
(String[] selectors) Sets the CSS selectors of the HTML elements before which to force a page break in PDF documentvoid
setPaginate
(boolean paginate) Sets the flag indicating if the HTML to PDF element can be paginated to render many PDF pages if necessaryvoid
setPersistentHttpRequestHeaders
(boolean persistentHttpRequestHeaders) Sets the flag indicating if the HTML to PDF converter will send the custom headers defined by thehttpRequestHeaders()
property each time an external resource (image, css, etc) referenced by the web page is requested.void
setPostScriptFontsEnabled
(boolean enabled) Sets a flag indicating if the fonts with PostScript outlines are enabled in HTML during the HTML to PDF conversion.void
setPrerenderEnabled
(boolean enabled) Sets a flag indicating if the HTML to PDF converter should perform a pre-rendering.void
setRenderedHtmlElementSelector
(String selector) Gets or sets the CSS selector of the HTML element to be rendered to PDF by the HTML to PDF converter.void
setShowFooterInEvenPages
(boolean showFooterInEvenPages) Sets flag indicating if the footer is displayed in the even pages of the PDF document where this element is renderedvoid
setShowFooterInOddPages
(boolean showFooterInOddPages) Sets the flag indicating if the footer is displayed in the odd pages of the PDF document where this element is renderedvoid
setShowHeaderInEvenPages
(boolean showHeaderInEvenPages) Sets flag indicating if the header is displayed in the even pages of the PDF document where this element is renderedvoid
setShowHeaderInOddPages
(boolean showHeaderInOddPages) Sets the flag indicating if the header is displayed in the odd pages of the PDF document where this element is renderedvoid
setStackRepeatedTableFooters
(boolean stackTableFooters) Gets or sets a flag indicating if the repeated HTML table footers are stacked at the bottom of the PDF page when multiple HTML tables have repeated footers on that PDF page.void
setStackRepeatedTableHeaders
(boolean stackTableHeaders) Sets the flag indicating if the repeated HTML table headers are stacked at the top of the PDF page when multiple HTML tables have repeated headers on that PDF page.void
setStretchToFit
(boolean stretchToFit) Sets the value of the flag indicating if the HTML content will be stretched if necessary to fit the available width in PDF page.void
setSvgFontsEnabled
(boolean enabled) Sets a flag indicating if the SVG fonts are enabled in HTML during the HTML to PDF conversion.void
setTableFooterRepeatEnabled
(boolean enabled) Sets the flag indicating if the repeating of the HTML table footer in PDF pages is enabled in the PDF document.void
setTableHeaderRepeatEnabled
(boolean enabled) Sets the flag indicating if the repeating of the HTML table header in PDF pages is enabled in the PDF document.void
setTableOfContentsEnabled
(boolean enabled) Sets flag indicating if this HTML to PDF element can contribute to the PDF document table of contents.void
setTopSpacing
(float topSpacig) Sets the space in points to introduce at the top of PDF pages where the HTML is rendered.void
setTransparentImagesEnabled
(boolean enabled) Sets flag indicating if the converter uses transparency information of the images in the PDF document The default property value is truevoid
Sets the conversion triggering mode used by the HTML to PDF convertervoid
Sets the URL of the HTML document to be converted to PDFvoid
setWebFontsEnabled
(boolean enabled) Sets the flag indicating if the Web Fonts are enabled in HTML during the HTML to PDF conversionvoid
setWidth
(float width) Sets the width in points of the destination rectangle in PDF page where the HTML content is rendered.void
setX
(float x) Sets the X coordinate in points where to start HTML rendering in first page.void
setXPSupplementalLanguages
(boolean enabled) Sets the flag in HTML to PDF converter indicating if the supplemental languages (complex script, right-to-left, East Asian) support was enabled in Windows XP Regional and Language Options.void
setY
(float y) Sets the Y coordinate in points where to start HTML rendering in first page.boolean
Gets the flag indicating if the footer is displayed in the even pages of the PDF document where this element is renderedboolean
Gets the flag indicating if the footer is displayed in the odd pages of the PDF document where this element is renderedboolean
Gets the flag indicating if the header is displayed in the even pages of the PDF document where this element is renderedboolean
Gets the flag indicating if the header is displayed in the odd pages of the PDF document where this element is renderedboolean
Gets the flag indicating if the repeated HTML table footers are stacked at the bottom of the PDF page when multiple HTML tables have repeated footers on that PDF pageboolean
Gets the flag indicating if the repeated HTML table headers are stacked at the top of the PDF page when multiple HTML tables have repeated headers on that PDF pageboolean
Gets the value of the flag indicating if the HTML content will be stretched if necessary to fit the available width in PDF pageboolean
Gets the flag indicating if the SVG fonts are enabled in HTML during the HTML to PDF conversionboolean
Gets the flag indicating if the repeating of the HTML table footer in PDF pages is enabled in the PDF documentboolean
Gets the flag indicating if the repeating of the HTML table header in PDF pages is enabled in the PDF documentboolean
Gets the flag indicating if this HTML to PDF element can contribute to the PDF document table of contentsboolean
Gets the flag indicating if rendering of HTML document is tiled in the PDF documentvoid
tiledRenderingEnabled
(boolean enabled) Sets the flag indicating if rendering of HTML document is tiled in the PDF document.float
Gets the space in points to introduce at the top of PDF pages where the HTML is rendered.boolean
Gets the flag indicating if the converter uses transparency information of the images in the PDF documentGets the conversion triggering mode used by the HTML to PDF converterurl()
Gets the URL of the HTML document to be converted to PDFboolean
Gets the flag indicating if the Web Fonts are enabled in HTML during the HTML to PDF conversionfloat
width()
Gets the width in points of the destination rectangle in PDF page where the HTML content is renderedfloat
x()
Gets the X coordinate in points where to start HTML rendering in first page.boolean
Gets the flag in HTML to PDF converter indicating if the supplemental languages (complex script, right-to-left, East Asian) support was enabled in Windows XP Regional and Language Optionsfloat
y()
Gets the Y coordinate in points where to start HTML rendering in first page.Methods inherited from class com.winnovative_software.PageGraphicElement
backColor, blending, clipRectangle, foreColor, gradient, lineStyle, opacity, rotate, scale, setBackColor, setBlending, setClipRectangle, setForeColor, setGradient, setLineStyle, setOpacity, skew, translate
-
Field Details
-
DEFAULT_HTML_VIEWER_WIDTH_PX
public static final int DEFAULT_HTML_VIEWER_WIDTH_PXThe default virtual browser width in pixels- See Also:
-
AUTO_HTML_VIEWER_HEIGHT_PX
public static final int AUTO_HTML_VIEWER_HEIGHT_PXThe default virtual browser height in pixels is set to autodetect the HTML content height.- See Also:
-
AVAILABLE_PDF_WIDTH_POINTS
public static final int AVAILABLE_PDF_WIDTH_POINTSThe default width in PDF of the element is set to available width in PDF page.- See Also:
-
AUTO_PDF_HEIGHT_POINTS
public static final int AUTO_PDF_HEIGHT_POINTSThe default width in PDF of the element is set to available width in PDF page.- See Also:
-
-
Constructor Details
-
HtmlToPdfElement
Creates a HTML string to PDF converter element that will be rendered at the (0,0) location in PDF page using a base URL to resolve the external resources and a document URL to resolve the internal links. The width of element in PDF page is the available width in PDF page and the height is auto determined- Parameters:
htmlStringToConvert
- The HTML string to convert to PDFhtmlStringBaseURL
- The full URL of the page from where this String was taken used to resolve the images and CSS files referenced by a relative URL in the HTML String. This parameter is optional and the default value is NULL
-
HtmlToPdfElement
Creates an URL to PDF converter element at the (0,0) location in PDF page. The width of element in PDF page is the available width in PDF page and the height is auto determined- Parameters:
urlToConvert
- the URL to convert to PDF
-
HtmlToPdfElement
Creates a HTML string to PDF converter element at the specified x and y coordinates in PDF page using a base URL to resolve the external resources and a document URL to resolve the internal links. The width of element in PDF page is the available width in PDF page and the height is auto determined- Parameters:
x
- the x position in points where the rendered content will be placedy
- the y position in points where the rendered content will be placedhtmlStringToConvert
- the HTML string to convert to PDFhtmlStringBaseURL
- the full URL of the page from where this String was taken used to resolve the images and CSS files referenced by a relative URL in the HTML String. This parameter is optional and the default value is NULL. When this parameter is NULL no base URL will be used
-
HtmlToPdfElement
Creates an URL to PDF converter element at the specified x and y coordinates in PDF page. The width of element in PDF page is the available width in PDF page and the height is auto determined- Parameters:
x
- the x position in points where the rendered content will be placedy
- the y position in points where the rendered content will be placedurlToConvert
- the URL to convert to PDF
-
HtmlToPdfElement
public HtmlToPdfElement(float x, float y, float width, String htmlStringToConvert, String htmlStringBaseURL) Creates a HTML string to PDF converter element at the specified x and y coordinates with the specified width using a base URL to resolve the external resources and a document URL to resolve the internal links. The height in PDF is auto determined- Parameters:
x
- the x position in points where the rendered content will be placedy
- the y position in points where the rendered content will be placedwidth
- the destination width in points for the rendered content. If the specified with is less or equal 0, the destination width will be given by the available width in pagehtmlStringToConvert
- the HTML string to convert to PDFhtmlStringBaseURL
- the full URL of the page from where this String was taken used to resolve the images and CSS files referenced by a relative URL in the HTML String. This parameter is optional and the default value is NULL. When this parameter is NULL no base URL will be used
-
HtmlToPdfElement
Creates an URL to PDF converter element at the specified x and y coordinates with the specified width. The height in PDF is auto determined- Parameters:
x
- the x position in points where the rendered content will be placedy
- the y position in points where the rendered content will be placedwidth
- the destination width in points for the rendered content. If the specified with is less or equal 0, the destination width will be given by the available width in pageurlToConvert
- the URL to convert to PDF
-
HtmlToPdfElement
public HtmlToPdfElement(float x, float y, float width, float height, String htmlStringToConvert, String htmlStringBaseURL) Creates a HTML string to PDF converter element at the specified x and y coordinates with the specified width and height using a base URL to resolve the external resources and a document URL to resolve the internal links- Parameters:
x
- the x position in points where the rendered content will be placedy
- the y position in points where the rendered content will be placedwidth
- the destination width in points for the rendered content. If the specified with is less or equal 0, the destination width will be given by the available width in pageheight
- the destination height in points for the rendered content. If the specified height is less or equal 0, the destination height will be auto determined so all the content can be rendered. Please note that the specified height is the effective height that will be rendered in the PDF document and does not include for example the empty spaces introduced by custom or automatic page breakshtmlStringToConvert
- the HTML string to convert to PDFhtmlStringBaseURL
- the full URL of the page from where this String was taken used to resolve the images and CSS files referenced by a relative URL in the HTML String. This parameter is optional and the default value is NULL. When this parameter is NULL no base URL will be used
-
HtmlToPdfElement
Creates an URL to PDF converter element at the specified x and y coordinates with the specified width and height- Parameters:
x
- the x position in points where the rendered content will be placedy
- the y position in points where the rendered content will be placedwidth
- the destination width in points for the rendered content. If the specified with is less or equal 0, the destination width will be given by the available width in pageheight
- the destination height in points for the rendered content. If the specified height is less or equal 0, the destination height will be auto determined so all the content can be rendered. Please note that the specified height is the effective height that will be rendered in the PDF document and does not include for example the empty spaces introduced by custom or automatic page breaksurlToConvert
- the URL to convert to PDF
-
HtmlToPdfElement
public HtmlToPdfElement(float x, float y, float width, String htmlStringToConvert, String htmlStringBaseURL, int htmlViewerWidth) Creates a HTML string to PDF converter element at the specified x and y coordinates with the specified width using a base URL to resolve the external resources and a document URL to resolve the internal links. The height in PDF is auto determined. The virtual browser width in pixels is specified by the htmlViewerWidth parameter- Parameters:
x
- the x position in points where the rendered content will be placedy
- the y position in points where the rendered content will be placedwidth
- the destination width in points for the rendered content. If the specified with is less or equal 0, the destination width will be given by the available width in pagehtmlStringToConvert
- the HTML string to convert to PDFhtmlStringBaseURL
- the full URL of the page from where this String was taken used to resolve the images and CSS files referenced by a relative URL in the HTML String. This parameter is optional and the default value is NULL. When this parameter is NULL no base URL will be usedhtmlViewerWidth
- the virtual browser width in pixels. The default value is 1024 pixels. The effect of this parameter is similar with viewing the HTML page in a browser window with the specified width
-
HtmlToPdfElement
Creates an URL to PDF converter element at the specified x and y coordinates with the specified width. The height in PDF is auto determined. The virtual browser width in pixels is specified by the htmlViewerWidth parameter- Parameters:
x
- the x position in points where the rendered content will be placedy
- the y position in points where the rendered content will be placedwidth
- the destination width in points for the rendered content. If the specified with is less or equal 0, the destination width will be given by the available width in pageurlToConvert
- the URL to convert to PDFhtmlViewerWidth
- the virtual browser width in pixels. The default value is 1024 pixels. The effect of this parameter is similar with viewing the HTML page in a browser window with the specified width
-
HtmlToPdfElement
public HtmlToPdfElement(float x, float y, float width, float height, String htmlStringToConvert, String htmlStringBaseURL, int htmlViewerWidth, int htmlViewerHeight) Creates a HTML string to PDF converter element at the specified x and y coordinates with the specified width and height using a base URL to resolve the external resources and a document URL to resolve the internal links. The virtual browser width and height in pixels is specified by the htmlViewerWidth and htmlViewerHeight parameters- Parameters:
x
- the x position in points where the rendered content will be placedy
- the y position in points where the rendered content will be placedwidth
- the destination width in points for the rendered content. If the specified with is less or equal 0, the destination width will be given by the available width in pageheight
- the destination height in points for the rendered content. If the specified height is less or equal 0, the destination height will be auto determined so all the content can be rendered. Please note that the specified height is the effective height that will be rendered in the PDF document and does not include for example the empty spaces introduced by custom or automatic page breakshtmlStringToConvert
- the HTML string to convert to PDFhtmlStringBaseURL
- the full URL of the page from where this String was taken used to resolve the images and CSS files referenced by a relative URL in the HTML String. This parameter is optional and the default value is NULL. When this parameter is NULL no base URL will be usedhtmlViewerWidth
- the virtual browser width in pixels. The default value is 1024 pixels. The effect of this parameter is similar with viewing the HTML page in a browser window with the specified widthhtmlViewerHeight
- the virtual browser height in pixels. The default value is 0 which means the height will be auto-determined. The effect of this parameter is similar with viewing the HTML page in a browser window with the specified width and height. When this parameter is less or equal to 0, the converter will try to auto-determine the HTML page height from the HTML document content
-
HtmlToPdfElement
public HtmlToPdfElement(float x, float y, float width, float height, String urlToConvert, int htmlViewerWidth, int htmlViewerHeight) Creates a URL to PDF converter element at the specified x and y coordinates with the specified width and height using a document URL to resolve the internal links. The virtual browser width and height in pixels are specified by the htmlViewerWidth and htmlViewerHeight parameters- Parameters:
x
- the x position in points where the rendered content will be placedy
- the y position in points where the rendered content will be placedwidth
- the destination width in points for the rendered content. If the specified with is less or equal 0, the destination width will be given by the available width in pageheight
- the destination height in points for the rendered content. If the specified height is less or equal 0, the destination height will be auto determined so all the content can be rendered. Please note that the specified height is the effective height that will be rendered in the PDF document and does not include for example the empty spaces introduced by custom or automatic page breaksurlToConvert
- the URL to convert to PDFhtmlViewerWidth
- the virtual browser width in pixels. The default value is 1024 pixels. The effect of this parameter is similar with viewing the HTML page in a browser window with the specified widthhtmlViewerHeight
- the virtual browser height in pixels. The default value is 0 which means the height will be auto-determined. The effect of this parameter is similar with viewing the HTML page in a browser window with the specified width and height. When this parameter is less or equal to 0, the converter will try to auto-determine the HTML page height from the HTML document content
-
-
Method Details
-
htmlViewerWidth
public int htmlViewerWidth()Gets the preferred HTML viewer width in pixels in HTML to PDF converter element- Returns:
- the preferred HTML viewer width in pixels
-
setHtmlViewerWidth
public void setHtmlViewerWidth(int viewerWidth) Gets or sets the preferred HTML viewer width in pixels in HTML to PDF converter element. If the HTML content is not entirely visible in the HTML viewer at the specified width, theclipHtmlView()
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 theclipHtmlView()
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 HtmlToPdfElement class constructor. The default value is 1024 pixels- Parameters:
viewerWidth
- the HTML viewer width to set
-
htmlViewerHeight
public int htmlViewerHeight()Gets the HTML viewer height in pixels in the HTML to PDF converter element- Returns:
- the HTML viewer height
-
setHtmlViewerHeight
public void setHtmlViewerHeight(int viewerHeight) Sets the HTML viewer height in pixels in the HTML to PDF converter element. 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 thehtmlViewerWidth()
property of theHtmlToPdfElement
class. If the HTML content is not entirely visible in the HTML viewer at the specified width, theclipHtmlView()
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 theHtmlToPdfElement
class constructor. The default value is 0 to automatically determine the HTML viewer height based on the HTML content and the HTML viewer width- Parameters:
viewerHeight
- the HTML viewer height to set
-
htmlViewerZoom
public int htmlViewerZoom()Gets the HTML viewer zoom percentage in HTML to PDF element similar to zoom level in a browser- Returns:
- the HTML viewer zoom
-
setHtmlViewerZoom
public void setHtmlViewerZoom(int viewerZoom) Sets HTML viewer zoom percentage in HTML to PDF element similar to zoom level in a browser. The default value of this property is 100- Parameters:
viewerZoom
- the HTML viewer zoom to set
-
clipHtmlView
public boolean clipHtmlView()Gets a flag indicating if the HTML content is clipped by HTML viewer window width- Returns:
- the HTML content clipping option
-
setClipHtmlView
public void setClipHtmlView(boolean clipView) Sets a flag indicating if the HTML content is clipped by HTML viewer window width. If the HTML content is not entirely visible in the HTML viewer of the HTML to PDF converter at the specified width, this 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 thehtmlViewerWidth()
property. The default value of this property is false- Parameters:
clipView
- the HTML clipping option value
-
url
Gets the URL of the HTML document to be converted to PDF- Returns:
- the URL of the HTML document to be converted to PDF
-
setUrl
Sets the URL of the HTML document to be converted to PDF- Parameters:
urlToConvert
- the URL of the HTML document to be converted to PDF
-
html
Gets the HTML string to be converted to PDF- Returns:
- the HTML string to be converted to PDF
-
setHtml
Sets the HTML string to be converted to PDF- Parameters:
htmlStringToConvert
- the HTML string to be converted to PDF
-
baseUrl
Gets the base URL of the HTML string to be converted to PDF- Returns:
- the base URL of the HTML string to be converted to PDF
-
setBaseUrl
Sets the base URL of the HTML string to be converted to PDF- Parameters:
htmlStringBaseURL
- the base URL of the HTML string to be converted to PDF
-
x
public float x()Gets the X coordinate in points where to start HTML rendering in first page.- Returns:
- the X coordinate
-
setX
public void setX(float x) Sets the X coordinate in points where to start HTML rendering in first page. By default the left location is 0- Parameters:
x
- the X coordinate
-
y
public float y()Gets the Y coordinate in points where to start HTML rendering in first page. By default the top location is 0- Returns:
- the Y coordinate
-
setY
public void setY(float y) Sets the Y coordinate in points where to start HTML rendering in first page. By default the top location is 0- Parameters:
y
- the Y coordinate
-
width
public float width()Gets the width in points of the destination rectangle in PDF page where the HTML content is rendered- Returns:
- the width in points of the destination rectangle
-
setWidth
public void setWidth(float width) Sets the width in points of the destination rectangle in PDF page where the HTML content is rendered. By default the destination width is the available width in PDF page- Parameters:
width
- the width in points of the destination rectangle
-
height
public float height()Gets the height in points of the destination rectangle in PDF page where the HTML content is rendered- Returns:
- the height in points of the destination rectangle
-
setHeight
public void setHeight(float height) Sets the height in points of the destination rectangle in PDF page where the HTML content is rendered. By default the destination height is automatically calculated to render the whole HTML content- Parameters:
height
- the height in points of the destination rectangle
-
topSpacing
public float topSpacing()Gets the space in points to introduce at the top of PDF pages where the HTML is rendered. 1 point is 1/72 inch- Returns:
- the space in points to introduce at the top of PDF pages
-
setTopSpacing
public void setTopSpacing(float topSpacig) Sets the space in points to introduce at the top of PDF pages where the HTML is rendered. 1 point is 1/72 inch. By default the top spacing is 0- Parameters:
topSpacig
- the space in points to introduce at the top of PDF pages
-
bottomSpacing
public float bottomSpacing()Gets the space in points to introduce at the bottom of PDF pages where the HTML is rendered. 1 point is 1/72 inch. By default the bottom spacing is 0- Returns:
- the space in points to introduce at the bottom of PDF pages
-
setBottomSpacing
public void setBottomSpacing(float bottomSpacing) Sets the space in points to introduce at the bottom of PDF pages where the HTML is rendered. 1 point is 1/72 inch. By default the bottom spacing is 0- Parameters:
bottomSpacing
- the space in points to introduce at the bottom of PDF pages
-
avoidTextBreak
public boolean avoidTextBreak()Gets the flag indicating if the HTML to PDF converter will try to avoid cutting off the text between PDF pages- Returns:
- the flag value
-
setAvoidTextBreak
public void setAvoidTextBreak(boolean avoidTextBreak) Sets the flag indicating if the HTML to PDF converter will try to avoid cutting off the text between PDF pages. By default this property is true- Parameters:
avoidTextBreak
- the flag value to set
-
avoidImageBreak
public boolean avoidImageBreak()Gets the flag indicating if the HTML to PDF converter will try to avoid cutting off the images between PDF pages- Returns:
- the flag value
-
setAvoidImageBreak
public void setAvoidImageBreak(boolean avoidImageBreak) Sets the flag indicating if the HTML to PDF converter will try to avoid cutting off the images between PDF pages- Parameters:
avoidImageBreak
- the flag value
-
avoidHtmlElementsBreakSelectors
Gets the CSS selectors of the HTML elements to not be broken between PDF pages if possible- Returns:
- the CSS selectors
-
setAvoidHtmlElementsBreakSelectors
Sets the CSS selectors of the HTML elements to not be broken between PDF pages if possible- Parameters:
selectors
- the CSS selectors to set
-
pageBreakBeforeHtmlElementsSelectors
Gets the CSS selectors of the HTML elements before which to force a page break in PDF document- Returns:
- the CSS selectors
-
setPageBreakBeforeHtmlElementsSelectors
Sets the CSS selectors of the HTML elements before which to force a page break in PDF document- Parameters:
selectors
- the CSS selectors to set
-
pageBreakAfterHtmlElementsSelectors
Gets the CSS selectors of the HTML elements after which to force a page break in PDF document- Returns:
- the CSS selectors
-
setPageBreakAfterHtmlElementsSelectors
Sets the CSS selectors of the HTML elements after which to force a page break in PDF document- Parameters:
selectors
- the CSS selectors to set
-
fitWidth
public boolean fitWidth()Gets the fag indicating if the HTML content will be resized if necessary to fit the available width in PDF page- Returns:
- the flag value
-
setFitWidth
public void setFitWidth(boolean fitWidth) Sets the fag indicating if 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- Parameters:
fitWidth
- the flag value to set
-
fitHeight
public boolean fitHeight()Gets the fag indicating if the HTML content will be resized if necessary to fit the available height in PDF page- Returns:
- the flag value
-
setFitHeight
public void setFitHeight(boolean fitHeight) Sets the fag indicating if the HTML content will be resized if necessary to fit the available height in PDF page. By default this property is false- Parameters:
fitHeight
- the flag value to set
-
stretchToFit
public boolean stretchToFit()Gets the value of the flag indicating if the HTML content will be stretched if necessary to fit the available width in PDF page- Returns:
- the flag value
-
setStretchToFit
public void setStretchToFit(boolean stretchToFit) Sets the value of the flag indicating if the HTML content will be stretched if necessary to fit the available width in PDF page. This property has effect in HTML to PDF converter only whenfitWidth()
property is true. WhenfitWidth()
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- Parameters:
stretchToFit
- the flag value to set
-
liveUrlsEnabled
public boolean liveUrlsEnabled()Gets the flag indicating if the HTML to PDF converter will convert the external links from HTML to PDF links in the PDF document- Returns:
- the flag value
-
setLiveUrlsEnabled
public void setLiveUrlsEnabled(boolean enabled) Sets the flag indicating if the HTML to PDF converter will convert the external links from HTML to PDF links in the PD. The default value is true- Parameters:
enabled
- the flag value to set
-
interactiveHiddenElements
public boolean interactiveHiddenElements()Gets the flag indicating if the interactive features are enabled for hidden HTML elements- Returns:
- the flag value
-
setInteractiveHiddenElements
public void setInteractiveHiddenElements(boolean enabled) Sets the flag indicating if the interactive features are enabled for hidden HTML elements. This property is false by default- Parameters:
enabled
- the flag value to set
-
internalLinksEnabled
public boolean internalLinksEnabled()Gets the flag indicating if the HTML to PDF converter to convert the internal HTML links (links with anchors) to internal PDF links in the PDF document- Returns:
- the flag value
-
setInternalLinksEnabled
public void setInternalLinksEnabled(boolean enabled) Sets the flag indicating if the HTML to PDF converter to convert the internal HTML links (links with anchors) to internal PDF links in the PDF document. The default value is true- Parameters:
enabled
- the flag value to set
-
javaScriptEnabled
public boolean javaScriptEnabled()Gets the flag indicating if JavaScript execution is enabled in HTML to PDF converter- Returns:
- the flag indicating if JavaScript execution is enabled in HTML to PDF converter
-
setJavaScriptEnabled
public void setJavaScriptEnabled(boolean enabled) Sets a flag indicating if JavaScript execution is enabled in HTML to PDF converter. The default is true- Parameters:
enabled
- the flag value to set
-
enable3DTransformations
public boolean enable3DTransformations()Gets the flag indicating if the accelerated CSS 3D transformations are enabled in the HTML to PDF converter. The default value is false- Returns:
- the flag indicating if the accelerated CSS 3D transformations are enabled in the HTML to PDF converter
-
setEnable3DTransformations
public void setEnable3DTransformations(boolean enabled) Gets or sets a flag indicating if the accelerated CSS 3D transformations are enabled in the HTML to PDF converter. The default value is false- Parameters:
enabled
- the flag value to set
-
enableWebGL
public boolean enableWebGL()Gets the flag indicating if the WebGL is enabled in the HTML to PDF converter- Returns:
- the flag indicating if the WebGL is enabled in the HTML to PDF converter
-
setEnableWebGL
public void setEnableWebGL(boolean enabled) Sets a flag indicating if the WebGL is enabled in the HTML to PDF converter. The default value is false- Parameters:
enabled
- the flag value to set
-
enableAccelerated2DCanvas
public boolean enableAccelerated2DCanvas()Gets the flag indicating if the accelerated 2D canvas is enabled in the HTML to PDF converter- Returns:
- the flag indicating if the accelerated 2D canvas is enabled in the HTML to PDF converter
-
setEnableAccelerated2DCanvas
public void setEnableAccelerated2DCanvas(boolean enabled) Sets the flag indicating if the accelerated 2D canvas is enabled in the HTML to PDF converter. The default value is false- Parameters:
enabled
- the flag value to set
-
enablePersistentStorage
public boolean enablePersistentStorage()Gets the flag indicating if the persistent local storage is enabled in converter- Returns:
- the flag indicating if the persistent local storage is enabled in converter
-
setEnablePersistentStorage
public void setEnablePersistentStorage(boolean enabled) Sets the flag indicating if the persistent local storage is enabled in converter. The default value is false- Parameters:
enabled
- the flag value to set
-
localFilesAccessEnabled
public boolean localFilesAccessEnabled()Gets the a flag indicating if the access to local files is enabled in the HTML to PDF element- Returns:
- flag indicating if the access to local files is enabled in the HTML to PDF Converter
-
setLocalFilesAccessEnabled
public void setLocalFilesAccessEnabled(boolean enabled) Sets the flag indicating if the access to local files is enabled in the HTML to PDF element. The default value is true- Parameters:
enabled
- the flag value to set
-
paginate
public boolean paginate()Gets the flag indicating if the HTML to PDF element can be paginated to render many PDF pages if necessary- Returns:
- the flag value
-
setPaginate
public void setPaginate(boolean paginate) Sets the flag indicating if the HTML to PDF element can be paginated to render many PDF pages if necessary- Parameters:
paginate
- the flag value to set
-
embedFonts
public boolean embedFonts()Gets the flag indicating if the HTML to PDF converter will embed all the true type fonts in the PDF document- Returns:
- the flag value
-
setEmbedFonts
public void setEmbedFonts(boolean embedFonts) Sets the flag indicating if the HTML to PDF converter will embed all the true type fonts in the PDF document. The default value of this property is true- Parameters:
embedFonts
- the flag value to set
-
httpPostFields
Returns the collection of HTTP POST fields to be used when accessing a web page in HTML to PDF 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- Returns:
- the collection of HTTP POST fields to be used when accessing a web page in HTML to PDF converter
-
mediaType
Gets the media type of the HTML document used by the HTML to PDF converter- Returns:
- the media type used by converter
-
setMediaType
Sets the media type of the HTML document used by the HTML to PDF 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- Parameters:
media
- the media type to be used by converter
-
svgFontsEnabled
public boolean svgFontsEnabled()Gets the flag indicating if the SVG fonts are enabled in HTML during the HTML to PDF conversion- Returns:
- the flag indicating if the SVG fonts are enabled
-
setSvgFontsEnabled
public void setSvgFontsEnabled(boolean enabled) Sets a flag indicating if the SVG fonts are enabled in HTML during the HTML to PDF conversion. The default value is false- Parameters:
enabled
- the flag value to set
-
webFontsEnabled
public boolean webFontsEnabled()Gets the flag indicating if the Web Fonts are enabled in HTML during the HTML to PDF conversion- Returns:
- the flag indicating if the Web Fonts are enabled
-
setWebFontsEnabled
public void setWebFontsEnabled(boolean enabled) Sets the flag indicating if the Web Fonts are enabled in HTML during the HTML to PDF conversion- Parameters:
enabled
- the flag value to set
-
enableHttp2
public boolean enableHttp2()Gets the flag indicating if the HTTP2 protocol is enabled in in HTML to PDF element converter. The property has effect only with NE version of the server- Returns:
- the flag indicating if the HTTP2 protocol is enabled
-
setEnableHttp2
public void setEnableHttp2(boolean enabled) Sets the flag indicating if the the HTTP2 protocol is enabled in in HTML to PDF element converter. The property has effect only with NE version of the server. The default value is false- Parameters:
enabled
- the flag value to set
-
postScriptFontsEnabled
public boolean postScriptFontsEnabled()Gets the flag indicating if the fonts with PostScript outlines are enabled in HTML during the HTML to PDF conversion- Returns:
- the flag indicating if the fonts with PostScript outlines are enabled
-
setPostScriptFontsEnabled
public void setPostScriptFontsEnabled(boolean enabled) Sets a flag indicating if the fonts with PostScript outlines are enabled in HTML during the HTML to PDF conversion. The default value is true- Parameters:
enabled
- the fag value to set
-
extensionsEnabled
public boolean extensionsEnabled()Gets the flag indicating if the HTML viewer extensions are executed during HTML to PDF conversion- Returns:
- the flag indicating if the HTML viewer extensions are executed
-
setExtensionsEnabled
public void setExtensionsEnabled(boolean enabled) Sets a flag indicating if the HTML viewer extensions are executed during HTML to PDF 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- Parameters:
enabled
- the flag value to set
-
downloadAllResources
public boolean downloadAllResources()Gets the flag indicating if the HTML to PDF converter should try to download all the resources- Returns:
- the flag indicating if the HTML to PDF converter should try to download all the resources
-
setDownloadAllResources
public void setDownloadAllResources(boolean download) Sets the flag indicating if the HTML to PDF converter should try to download all the resources even if this could cause a slower conversion. The default value is false- Parameters:
download
- the flag value to set
-
prerenderEnabled
public boolean prerenderEnabled()Gets the flag indicating if the HTML to PDF converter should perform a pre-rendering- Returns:
- the flag indicating if the HTML to PDF converter should perform a pre-rendering
-
setPrerenderEnabled
public void setPrerenderEnabled(boolean enabled) Sets a flag indicating if the HTML to PDF converter should perform a pre-rendering. The default value is false- Parameters:
enabled
- the flag value to set
-
interruptSlowJavaScript
public boolean interruptSlowJavaScript()Gets the flag indicating if the slow JavaScript script should be interrupted in HTML to PDF converter- Returns:
- the flag indicating if the slow JavaScript script should be interrupted
-
setInterruptSlowJavaScript
public void setInterruptSlowJavaScript(boolean interrupt) Sets a flag indicating if the slow JavaScript script should be interrupted in HTML to PDF converter. The default value is false and the scripts are not interrupted- Parameters:
interrupt
- the flag value to set
-
setHiddenHtmlElementsSelectors
Sets the CSS selectors of the HTML elements to be excluded from rendering during HTML to PDF conversion- Parameters:
hiddenHtmlElementsSelectors
- the CSS selectors of the HTML elements to be excluded from rendering during HTML to PDF conversion
-
renderedHtmlElementSelector
Gets the CSS selector of the HTML element to be rendered to PDF by the HTML to PDF converter- Returns:
- the selector of the HTML element to be rendered
-
setRenderedHtmlElementSelector
Gets or sets the CSS selector of the HTML element to be rendered to PDF by the HTML to PDF 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- Parameters:
selector
- the CSS selector of the HTML element to be rendered to PDF
-
maxHtmlViewerHeight
public int maxHtmlViewerHeight()Gets the maximum height in pixels to be rendered from the HTML document by the HTML to PDF converter- Returns:
- the maximum height in pixels to be rendered from the HTML document
-
setMaxHtmlViewerHeight
public void setMaxHtmlViewerHeight(int maxHeight) Sets the maximum height in pixels to be rendered from the HTML document by the HTML to PDF converter. The default value is 0 and the entire HTML document is rendered- Parameters:
maxHeight
- the maximum height in pixels to be rendered from the HTML document
-
minHtmlViewerHeight
public int minHtmlViewerHeight()Gets the minimum height in pixels to be rendered from the HTML document by the HTML to PDF converter- Returns:
- the minimum height in pixels to be rendered from the HTML document
-
setMinHtmlViewerHeight
public void setMinHtmlViewerHeight(int minHeight) Sets the minimum height in pixels to be rendered from the HTML document by the HTML to PDF converter. The default value is 0 and the entire HTML document is rendered- Parameters:
minHeight
- the minimum height in pixels to be rendered from the HTML document
-
initialHtmlViewerHeight
public int initialHtmlViewerHeight()Gets the initial height in pixels of the HTML viewer in HTML to PDF converter- Returns:
- the initial height in pixels of the HTML viewer
-
setInitialHtmlViewerHeight
public void setInitialHtmlViewerHeight(int initialHeight) Sets the initial height in pixels of the HTML viewer in HTML to PDF converter. This value of this property is ignored if the HtmlViewerHeight property is set- Parameters:
initialHeight
- the initial height in pixels of the HTML viewer
-
defaultHtmlEncoding
Gets the default HTML document text encoding to be used if there is no charset meta tag defined in the HTML document- Returns:
- the default HTML document text encoding
-
setDefaultHtmlEncoding
Sets the default HTML document text encoding to be used if there is no charset meta tag defined in the HTML document- Parameters:
encoding
- the default HTML document text encoding
-
imagePartSize
public int imagePartSize()Gets the maximum height in pixels of an image part in HTML to PDF converter- Returns:
- the maximum height in pixels of an image part
-
setImagePartSize
public void setImagePartSize(int height) Sets the maximum height in pixels of an image part in HTML to PDF converter- Parameters:
height
- the maximum height in pixels of an image part
-
triggeringMode
Gets the conversion triggering mode used by the HTML to PDF converter- Returns:
- the conversion triggering mode
-
setTriggeringMode
Sets the conversion triggering mode used by the HTML to PDF converter- Parameters:
mode
- the conversion triggering mode
-
conversionDelay
public int conversionDelay()Gets the 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 PDF converter. Default value is 0- Returns:
- the additional time in seconds to wait for asynchronous items to be completely loaded
-
setConversionDelay
public void setConversionDelay(int delay) Sets 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 PDF converter. Default value is 0- Parameters:
delay
- the additional time in seconds to wait for asynchronous items to be completely loaded
-
manualTriggeringConversionDelay
public int manualTriggeringConversionDelay()Gets the additional time in seconds to wait after manual triggering before starting the rendering. Default value is 0- Returns:
- the additional time in seconds to wait
-
setManualTriggeringConversionDelay
public void setManualTriggeringConversionDelay(int delay) Sets an additional time in seconds to wait after manual triggering before starting the rendering. Default value is 0- Parameters:
delay
- the additional time in seconds to wait
-
httpRequestHeaders
Gets a collection of custom HTTP headers to be sent by the HTML to PDF 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 tohttpRequestHeaders()
collection. ThepersistentHttpRequestHeaders()
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 thepersistentHttpRequestHeaders()
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 thehttpRequestCookies()
property- Returns:
- the collection of custom HTTP headers to be sent by the HTML to PDF converter to the web server
-
persistentHttpRequestHeaders
public boolean persistentHttpRequestHeaders()Gets the flag indicating if the HTML to PDF converter will send the custom headers defined by thehttpRequestHeaders()
property each time an external resource (image, css, etc) referenced by the web page is requested- Returns:
- the flag value
-
setPersistentHttpRequestHeaders
public void setPersistentHttpRequestHeaders(boolean persistentHttpRequestHeaders) Sets the flag indicating if the HTML to PDF converter will send the custom headers defined by thehttpRequestHeaders()
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- Parameters:
persistentHttpRequestHeaders
- the flag value to set
-
httpRequestCookies
Gets a collection of custom HTTP cookies to be sent by the HTML to PDF 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 tohttpRequestCookies()
collection- Returns:
- the collection of custom HTTP cookies to be sent by the HTML to PDF converter to the web server when the web page to convert and the resources (image, css, etc) referenced by the web page are requested
-
xpSupplementalLanguages
public boolean xpSupplementalLanguages()Gets the flag in HTML to PDF converter indicating if the supplemental languages (complex script, right-to-left, East Asian) support was enabled in Windows XP Regional and Language Options- Returns:
- the flag in HTML to PDF converter indicating if the supplemental languages support was enabled in Windows XP
-
setXPSupplementalLanguages
public void setXPSupplementalLanguages(boolean enabled) Sets the flag in HTML to PDF 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- Parameters:
enabled
- the flag value to set
-
tiledRenderingEnabled
public boolean tiledRenderingEnabled()Gets the flag indicating if rendering of HTML document is tiled in the PDF document- Returns:
- the flag value
-
tiledRenderingEnabled
public void tiledRenderingEnabled(boolean enabled) Sets the flag indicating if rendering of HTML document is tiled in the PDF document. This property is true by default- Parameters:
enabled
- the flag value to set
-
insertNewPagesEnabled
public boolean insertNewPagesEnabled()Gets the flag indicating if the HTML to PDF element will always insert a new page in the PDF document when rendering next page instead of trying to use an already existing PDF page- Returns:
- the flag value
-
setInsertNewPagesEnabled
public void setInsertNewPagesEnabled(boolean insertNewPagesEnabled) Sets the flag indicating if the HTML to PDF element will always insert a new page in the PDF document when rendering next page instead of trying to use an already existing PDF page. This property is false by default- Parameters:
insertNewPagesEnabled
- the flag value to set
-
enhancedGraphicsQuality
public boolean enhancedGraphicsQuality()Gets the flag indicating the PDF graphics are rendered at the best quality in the PDF document- Returns:
- the flag value
-
setEnhancedGraphicsQuality
public void setEnhancedGraphicsQuality(boolean enabled) Sets the flag indicating the PDF graphics are rendered at the best quality in the PDF document. The default property value is true.- Parameters:
enabled
- the flag value to set
-
transparentImagesEnabled
public boolean transparentImagesEnabled()Gets the flag indicating if the converter uses transparency information of the images in the PDF document- Returns:
- the flag value
-
setTransparentImagesEnabled
public void setTransparentImagesEnabled(boolean enabled) Sets flag indicating if the converter uses transparency information of the images in the PDF document The default property value is true- Parameters:
enabled
- the flag value to set
-
imagesScalingEnabled
public boolean imagesScalingEnabled()Gets the flag indicating if the images scaling is allowed in the PDF document- Returns:
- the flag value
-
setImagesScalingEnabled
public void setImagesScalingEnabled(boolean enabled) Sets flag indicating if the images scaling is allowed in the PDF document. The default property value is false- Parameters:
enabled
- the flag value to set
-
noSizeElementsEnabled
public boolean noSizeElementsEnabled()Gets the flag indicating if the hidden elements are rendered in the PDF document- Returns:
- the flag value
-
setNoSizeElementsEnabled
public void setNoSizeElementsEnabled(boolean enabled) Sets flag indicating if the hidden elements are rendered in the PDF document. The default property value is false- Parameters:
enabled
- the flag value to set
-
tableHeaderRepeatEnabled
public boolean tableHeaderRepeatEnabled()Gets the flag indicating if the repeating of the HTML table header in PDF pages is enabled in the PDF document- Returns:
- the flag value
-
setTableHeaderRepeatEnabled
public void setTableHeaderRepeatEnabled(boolean enabled) Sets the flag indicating if the repeating of the HTML table header in PDF pages is enabled in the PDF document. Default value is true- Parameters:
enabled
- the flag value to set
-
stackRepeatedTableHeaders
public boolean stackRepeatedTableHeaders()Gets the flag indicating if the repeated HTML table headers are stacked at the top of the PDF page when multiple HTML tables have repeated headers on that PDF page- Returns:
- the flag value
-
setStackRepeatedTableHeaders
public void setStackRepeatedTableHeaders(boolean stackTableHeaders) Sets the flag indicating if the repeated HTML table headers are stacked at the top of the PDF page when multiple HTML tables have repeated headers on that PDF page. Default value is true- Parameters:
stackTableHeaders
- the flag value to set
-
proxyOptions
Gets a reference to an object encapsulating the proxy options used by HTML to PDF converter to access the HTML document to convert- Returns:
- a reference to an object encapsulating the proxy options used by HTML to PDF converter to access the HTML document to convert
-
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 PDF Converter. They can be used for example to resolve the IIS Integrated Windows Authentication or other types of IIS authentication- Returns:
- the object encapsulating the authentication options
-
impersonationOptions
The impersonation options applied during navigation in HTML to PDF converter- Returns:
- the object encapsulating the impersonation options
-
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 thePdfBookmarkOptions.htmlElementSelectors()
property ofPdfBookmarkOptions
class with the CSS selectors of the HTML elements you want to bookmark- Returns:
- a reference to the object controlling the bookmarks creation
-
tableOfContentsEnabled
public boolean tableOfContentsEnabled()Gets the flag indicating if this HTML to PDF element can contribute to the PDF document table of contents- Returns:
- flag indicating if this HTML to PDF element can contribute to the PDF document table of contents
-
setTableOfContentsEnabled
public void setTableOfContentsEnabled(boolean enabled) Sets flag indicating if this HTML to PDF element can contribute to the PDF document table of contents. The default value is true- Parameters:
enabled
- the flag value to set
-
pdfFormOptions
Gets a reference to the object controlling the automatic conversion of a HTML form to a PDF form in the generated PDF document- Returns:
- a reference to the object controlling the automatic conversion of a HTML form to a PDF form in the generated PDF document
-
htmlElementsMappingOptions
Gets a reference to the object that can be used to obtain the position in PDF of the HTML elements rendered by the HTML to PDF converter. In order to retrieve the position in PDF for a list of HTML elements, theHtmlElementsMappingOptions.htmlElementSelectors()
property ofHtmlElementsMappingOptions
class must be set with an array of strings containing the CSS selectors of the HTML elements you want to map. The positions of the HTML elements in the generated PDF document will be returned in theHtmlElementsMappingOptions.htmlElementsMappingResult()
object after the element was added to the page- Returns:
- a reference to the object that can be used to obtain the position in PDF of the HTML elements rendered by the HTML to PDF converter
-
renderedPagesRectangles
Gets the bounds of the rendered rectangle on each PDF page. This property is assigned after the element has been added to a PDF page- Returns:
- the bounds of the rendered rectangle on each PDF page
-
htmlDocumentInfo
Gets an object populated after conversion with the title, keywords, and description of the converted HTML document- Returns:
- an object populated after conversion with the title, keywords, and description of the converted HTML document
-
showHeaderInOddPages
public boolean showHeaderInOddPages()Gets the flag indicating if the header is displayed in the odd pages of the PDF document where this element is rendered- Returns:
- the flag value
-
setShowHeaderInOddPages
public void setShowHeaderInOddPages(boolean showHeaderInOddPages) Sets the flag indicating if the header is displayed in the odd pages of the PDF document where this element is rendered- Parameters:
showHeaderInOddPages
- the flag value to set
-
showHeaderInEvenPages
public boolean showHeaderInEvenPages()Gets the flag indicating if the header is displayed in the even pages of the PDF document where this element is rendered- Returns:
- the flag value
-
setShowHeaderInEvenPages
public void setShowHeaderInEvenPages(boolean showHeaderInEvenPages) Sets flag indicating if the header is displayed in the even pages of the PDF document where this element is rendered- Parameters:
showHeaderInEvenPages
- the flag value to set
-