Java | Converting HTML to PDF using iText

html to PDF

Creating a PDF file from HTML can be done using iText Java library. iText has an add-on that enables converting HTML to PDF document. This post shows how to use iText to convert HTML to PDF.

“When using iText PDF in a closed source environment, you will need to purchase an iText PDF commercial license.”

Environment, Tools & Libraries used in this post

Depenedenceis

pom.xml

   com.itextpdf itext7-core 7.1.9 pom   com.itextpdf html2pdf 2.1.6   

HtmlConverter Class