Skip to content

pdfHTML 4.0.4

Compare
Choose a tag to compare
@introfog introfog released this 25 Oct 10:00
· 219 commits to develop since this release
4.0.4

pdfHTML is an iText 7 add-on for Java and .NET to create PDF from HTML (and associated CSS).

The big news for this release is the addition of support for CSS4 device-cmyk colors. Until now pdfHTML only supported CSS RGB colors for direct conversion to PDF, although a workaround was possible by using convertToElements rather than convertToPdf. However, we decided to add initial support for device-cmyk following a request from a customer who wanted to make use of this functionality to optimize their workflow.

Note that this functionality is not available out of the box since device-cmyk is classed as an experimental feature in CSS, and only exists in CSS working drafts. To enable device-cmyk notation you'll need to change the validation rules with the CssDeclarationValidationMaster#setValidator before working with html2pdf. There are currently 2 validators: CssDefaultValidator – the default validator which uses the previous rules of CSS validation and CssDeviceCmykAwareValidator – which, as the name suggests does support this experimental feature.

New features

  • Support for device-cmyk