Release date: April 11, 2022

pdfHTML is an iText 7 add-on that allows you to easily convert HTML and CSS into standards compliant PDFs that are accessible, searchable and usable for indexing. It's also great for using HTML templates to generate well-formatted, well-structured PDF documents.

The release of pdfHTML 4.0.2 brings a couple of nice bugfixes. In previous versions, converting an HTML file which had an @font-face rule with an empty body would result in an NPE. Now, pdfHTML will simply ignore such declarations.

We've also fixed a CSS bug where a checkbox with 100% width and the display: block property would result in incorrect horizontal margins being applied during conversion.


  • Empty @font-face rule no longer results in NPE
  • Fixed the display of checkboxes at 100% width


iText 7: Converting HTML to PDF with pdfHTML

Installation Instructions

Examples (latest ones)

FAQ (latest ones)