Some test text!

Discord Logo

Chat with us

PDFTron is now Apryse, learn more here.

Core / Guides / Web/HTML to PDF



PDFTron is now Apryse, learn more here.

Convert HTML to PDF on Cross-Platform (Core)

HTML2PDF Module is an optional add-on utility which can be used with Apryse SDK to convert an HTML file to a PDF document without any external third party dependencies.

You can find more details about how to install HTML2PDF Module here:

Apryse HTML2PDF Module

Requires the HTML2PDF module add-on.
// Start with a PDFDoc (the conversion destination)
PDFDoc doc = new PDFDoc();
HTML2PDF converter = new HTML2PDF();

// add from HTML String data

// add from a web page location

// apply conversion

Convert HTML to PDF
Full sample code for directly converting HTML pages to PDF by using 'pdftron.PDF.HTML2PDF'. The HTML2PDF converter supports HTML conversion from a string or URL and offers many options to control page size and formatting.

Get the answers you need: Support