pdfHTML is an iText Core add-on for creating PDF from HTML/XML (and associated CSS).
This release focuses on extending the existing support for GraalVM Native Image to pdfHTML, and major improvements to CSS. In addition, pdfHTML takes advantage of Core enhancements such as table performance, SVG, font handling, layout and PDF/UA.
GraalVM Native Image
Our built-in support for GraalVM Native Image compilation now includes pdfHTML. This means you can potentially build a complete template conversion executable to run anywhere, using only the Core and pdfHTML modules you need, while benefiting from the performance gains that GraalVM brings with its JIT compilation process.
SVG and CSS Improvements
As mentioned above, pdfHTML hugely benefits from the extended SVG and CSS coverage in this release. In particular, the text-decoration
, marker-mid
, and stroke-dash-array
additions, along with support for different CSS origins in SVG.
There are improvements to SVG Text, which also benefit pdfCalligraph. Along with that are numerous refinements and bugfixes to aid utilizing SVG and CSS for templating. One thing to call out is the improved Flex container usage with tables. Speaking of which…
Table and Forms Improvements
We’ve already mentioned the massive performance increase for tables in Core, and HTML template conversions with tables will take great advantage of this. Using pdfHTML for PDF/A and PDF/UA conformance will also see especially large performance increases, due to the tagged table optimizations.
In addition, the conversion of HTML forms for PDF/UA conformance is improved.
New Features
- GraalVM Native Image support
- Extended SVG and CSS coverage
Improvements
- Table performance improvements
- Support relative values for width/height SVG element attributes
- Different CSS origins support in SVG
- Apply links alternate description according to UA standard
- Support external CSS for HTML embedded SVG
- Support CSS @import url() rule to reference external resources
Bug Fixes
- StringIndexOutOfBoundsException if url is without closing bracket
- SVG: fix percent width&height resolving of top level SVG when it is used from html
- Flex container with table splitup issue
- HTML, SVG: properly handle svg images in html with set background-size and viewbox
- Issue with applying justify align in condensed fonts (MS PGothic)
- HTML: explicit background image size should respect element size
- Renderer splitup issue
- PNullReferenceException for missing image