BFO PDF Library 2.26.2 and Report Generator 1.2.5

BFO PDF Library 2.26.2

BFO Report Generator 1.2.5

Today we've put out two new releases, for the PDF Library and Report Generator. These are the first releases tested on and verified with Java 17. We've also dropped support for Java 5, and we've dropped all the classes relating to Applets.

Here are some of the highlights

Java 17 is in, Java 5 is out, Java17+JavaScript is disabled

This release of the API runs well on Java 17 - in particular, conversion of a PDF to a bitmap is running 30% faster than it was on Java 11 or 14, which is quite a jump. However the upgrade wasn't as smooth as it normally goes, for several reasons.

First, Java 17 comes with an updated Locale databases and a few changes were required for this, mainly for the Hebrew language. A large number of older methods have been deprecated, which required a few internal changes (some dusty corners of the API date back to Java 1.3), and in particular the SecurityManager classes have been deprecated and scheduled for removal.

This is one of the reasons that, for now, processing of PDF JavaScript is not supported under Java 17. Our single interface has supported three different JavaScript engines since Java 5, but the move to the GraalVM for JS support, and in particular the need to secure the JVM from malicious JavaScript without resorting to the SecurityManager, and without breaking the API for versions prior to Java 17 in the same Jar, is proving complicated.

There are relatively few users using PDF JavaScript - we've probably spoken to you already if you're one of them - but this is something to bear in mind when upgrading to Java 17. We don't have an ETA for adding support, but it will be early 2022. And JavaScript will continue to run under Java 16 and earlier.

More improvements for "convert to PDF/A"

OUr last two releases have been heavily focussed on this area, and as promised in our last article we've rolled in some of the things we learned from large scale testing. In particular, the algorithm for choosing which fonts to substitute has improved, and the amount of memory required to speculatively load an OpenTypeFont for potential inclusion has dropped; we postpone loading some of the structures until the font is used to display text. So if you're loading a number of fonts in advance but there's a chance some of them won't be chosen for substitition into the PDF, this release will help.

Other enhancements

The rest of the issues are minor improvements: QR-Codes now support all UTF-8 characters; we can load WOFF2 format OpenType collections; and we've fixed the usual array of small issues that we've found or that you've reported to us. We also finally managed to isolate and (mostly) work around an annoying bug on Linux under java 11.0.4 and later that was causing some types of font to render incorrectly: so if you're converting PDF to bitmaps on Linux, this is a useful upgrade.

Report Generator support

Finally, our Report Generator has been rebuild to pick up these changes - the Locale changes under Java 17 meant this wasn't something we could delay. So all the changes described above are in the latest 1.2.5 release of the Report Generator.


As always, you can download the latest version and upgrade any time.