Click or drag to resize
Pdf Library for .NET

HtmlToPdfOptions Properties

The HtmlToPdfOptions type exposes the following members.

Properties
  Name Description
Public property AllowContentHeightResize A flag used only by WebKitRestricted, Blink or Chromium engines indicating if the content height can be recalculated to better fit the page. This can introduce certain errors in some cases. The default is True. Set it to False if content is split to more pages than expected.
Public property Authentication Handles authentication options if the web page being converted requires authentication.
Public property AutoFitHeight Specifies the html content vertical auto fit mode.
Public property AutoFitWidth Specifies the html content horizontal auto fit mode.
Public property BlinkEngineLaunchMaxTries Blink engine process launch tries.
Public property BlinkEngineLaunchTimeout Blink engine process launch timeout.
Public property BlinkEnginePath Gets or sets the full path (excluding the chrome.exe file name) of the Blink html rendering engine binaries.
Public property BlinkEngineTemporaryFilesPath Gets or sets the full path of a folder where Blink html rendering engine will write temporary files.
Public property CefEnginePath Gets or sets the full path of the directory containing the SelectPdf.Cef.exe binary.
Public property CefEngineTemporaryFilesPath Gets or sets the full path of a folder where the CEF rendering engine will write temporary files.
Public property ClickElementsDelayAfter Delay in miliseconds, after element click.
Public property ClickElementsDelayBefore Delay in miliseconds, before element click.
Public property ClickElementsSelectors Specifies elements from the web page that will be clicked before converting the page.
Public property ColorSpace Gets or sets the color space of the generated pdf document.
Public property CssMediaType Indicates what css styles are used when the web page is rendered.
Public property CustomCSS Use this property to specify some CSS styles that will be injected into the page that is converted.
Public property DenyLocalFileAccess A flag indicating if local files can be loaded during the conversion. The default value is False and local files can be loaded.
Public property DisplayCutText Gets or sets a flag indicating if the text that is out of the calculated rendering rectangle is displayed or not.
Public property DisplayFooter Controls if a custom footer is displayed in the generated pdf document.
Public property DisplayHeader Controls if a custom header is displayed in the generated pdf document.
Public property DrawBackground Gets or sets a flag indicating if the web page background is rendered in pdf.
Public property EmbedFonts Instructs the converter to embed all the needed fonts into the pdf document or not.
Public property EnableOfflineMode Put the browser into offline mode before navigation, so all network requests fail. Useful for testing offline fallbacks or blocking all external fetches from cached content.
Public property ExternalBrowserEndpoint External browser service.
Public property ExternalLinksEnabled Controls the rendering of external hyperlinks in pdf.
Public property HttpCookies Gets the collection of custom HTTP cookies used for the conversion.
Public property HttpHeaders Get the collection of custom HTTP headers used for the conversion.
Public property HttpPostParameters Gets the collection of custom HTTP POST parameters used for the conversion.
Public property InternalLinksEnabled Controls the conversion of internal html links to internal pdf links.
Public property JavaScriptEnabled Enable scripts when rendering the url or html string.
Public property JpegCompressionEnabled Gets or sets a flag indicating if the JPEG compression is enabled or not for the images in the generated pdf document.
Public property JpegCompressionLevel Gets or sets the compression level of images in the generated pdf document.
Public property KeepImagesTogether This property instructs the converter whether to try to avoid cutting off the images between pdf pages or not.
Public property KeepTextsTogether This property instructs the converter whether to try to avoid cutting off the text lines between pdf pages or not.
Public property LazyImagesLoadingDelay Delay per page, in miliseconds, for lazy images loading.
Public property LazyImagesLoadingEnabled Enables a delay mechanism to allow images to fully load.
Public property LFN Internal use only.
Public property LFNB Internal use only.
Public property LoginOptions Handle custom page login.
Public property MarginBottom The bottom margin of the pdf document.
Public property MarginLeft The left margin of the pdf document.
Public property MarginRight The right margin of the pdf document.
Public property MarginTop The top margin of the pdf document.
Public property MaxConversionTime Timeout in seconds for the print / capture phase (producing the PDF after the page has loaded). Applies to the Chromium rendering engine only.
Public property Static member MaximumConcurrentConversions Maximum number of html to pdf conversions that can be performed simultaneously.
Public property MaxPageLoadTime The web page navigation timeout in seconds.
Public property MinPageLoadTime An additional time in seconds to wait for asynchronous items to be loaded before the web page is rendered.
Public property PageBreaksEnhancedAlgorithm Gets or sets a flag indicating if an enhanced custom page breaks algorithm is used. The enhanced algorithm is a little bit slower but it will prevent the appearance of hidden text in the PDF when custom page breaks are used.
Public property PageRanges Restrict the generated PDF to a subset of pages, e.g. "1", "2-4", "1-3,5,7-".
Public property PdfBookmarkOptions Gets a reference to the object that controls the bookmarks creation for the generated pdf document.
Public property PdfCompressionLevel This property controls the compression level of the generated pdf document.
Public property PdfDocumentInformation Gets a reference to the object that specifies the generated pdf document properties.
Public property PdfPageCustomSize This property can be used to specify a custom pdf document page size.
Public property PdfPageOrientation This property controls the page orientation of the generated pdf document pages.
Public property PdfPageSize This property controls the size of the generated document pages.
Public property PdfStandard Defines the pdf standard used by the generated pdf document.
Public property PluginsEnabled A flag indicating if plugins (like Flash players) are enabled in the converter.
Public property PostLoadingScript 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 property PostLoadingScriptDelayAfter Delay in miliseconds, after post page loading javascript injection.
Public property ProxyOptions Gets a reference to an object containing the proxy settings used to access the web page that is being converted.
Public property RenderingEngine Gets or sets the rendering engine used by the converter to load and render the HTML. The possible values are WebKit, WebKitRestricted and Blink. The Webkit rendering engine is internal and renders similar to Apple's Safari. For Blink, Chromium binaries must be also installed.
Public property RenderPageOnTimeout 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.
Public property ScaleImages A flag indicating if the images from the page are scaled during the conversion process. The default value is False and images are not scaled.
Public property SecureProtocol Protocol used for secure (HTTPS) connections.
Public property SecurityOptions Gets a reference to the object that specifies the generated pdf document security settings.
Public property ViewerPreferences Controls how the pdf document will appear in a pdf viewer (like Adobe Reader).
Public property WebPageFixedSize Controls whether the web page is rendered with a fixed size internal browser or the size automatically extends to make the whole content visible.
Public property WebPageHeight Gets or sets the height of the converted web page as it would appear in the internal browser used to render the html.
Public property WebPageWidth Gets or sets the width of the converted web page as it would appear in the internal browser used to render the html.
Public property WindowStatus If set, the converter waits for window.status to match this string before capturing the page. Useful for pages that signal readiness via the classic window.status = "ready" handshake.
Top
See Also