Html To Pdf Converter
Converts HTML to PDF document.
Note: HTML-to-PDF conversion internally relies on the system WebView implementation. This means that there are certain aspects of this conversion process that PSPDFKit can't support. This includes, for example, any possible WebView bugs.
Note: JavaScript execution is enabled by default. This could cause security and performance issues. Please review your JavaScripts carefully. If you wish to disable JavaScript execution while performing the HTML conversion, set setJavaScriptEnabled to false.
Note: This API requires HTML-to-PDF conversion feature in your license.
Types
Factory methods and device-capability checks for HtmlToPdfConverter.
Listener for page loading progress updates used when loading HTML page in HtmlToPdfConverter.
Functions
Performs HTML-to-PDF conversion to a temporary file in application's cache directory.
Performs HTML-to-PDF conversion to specified file.
Sets the density that should be used when converting HTML images to PDF. Defaults to 300 dpi.
Sets the size of the created PDF. Defaults to NewPage.PAGE_SIZE_A4.
Enables or disables JavaScript processing. Defaults to true.
Sets listener that will be called whenever page loading progress changes.
Sets resource interceptor that will be called whenever the HTML converter wants to load any page resource (image, stylesheet, JavaScript etc.). Use this if you want to inject custom resources that are otherwise not accessible from the base URL or when you want to override default resource resolution.
Sets the timeout for loading the HTML document when converting. Defaults to 30000 ms.
Sets the document title (set via DocumentPdfMetadata). Defaults to HTML title if present (i.e. contents of the <title> tag); sets no title if the HTML document has no title.