BFO PDF Library 2.24.4 - what's new?

BFO PDF Library 2.24.4

Here's a new release as we draw to the end of a very singular year. 2.24.4 adds quite a lot of new features, and here's a bit of detail on the highlights.

XMP Metadata

XMP Metadata has been a part of the PDF API for years, but we've always hidden the details away in some private classes, with access limited to getting or setting the XML via the getMetadata() and setMetadata() methods on PDF and (latterly) several other classes. This release adds a new XMP class which bring it all out front.

There's a lot going on here, and so the class has a larger than usual list of examples. It should make it much easier to work with XMP, partcularly if you're generating or working with custom Schema Extensions for PDF/A-1, A-2 and A-3. Always problematic, these are no longer part of the upcoming PDF/A-4, which replaces these with RelaxNG schema as defined in part 3 of ISO16684:2019

This class supports RelaxNG schema as well - reading, writing, validating and even generating them where required. Although an optional aspect of PDF/A-4, we hope to see these used and are pleased to be able to repurpose the vast amount of (appropriately) metadata about metadata that we've assembled for PDF/A schema validation for RelaxNG schemas.

User data

Many user applications would like to be able to include some custom data with the PDF. This is usually done by bolting some custom values into the Info dictionary, but this release gives new putUserData method to store and retrieve custom properties with the file. There are similar methods on PDFPage, PDFAnnotation and EmbeddedFile

PDF/UA-1 improvements

We've done quite a bit of polishing of the PDF/UA-1 creation and validation code, to bring our profile inline with the "veraPDF" project. Validating a PDF/UA-1 file with our API should give more accurate results, and we've been liaising with the veraPDF team to try and make sure any differences that remain, won't remain for long.

Swisscom (and other asynchronous) digital signatures

A minor change, but a useful one for those using Swisscom's Digital Signature systam, or any other asynchronous signing service - i.e. one where the signature turns up some time after the PDF has been created. The new "getByteRange" method on the FormSignature class should make it easy to reopen the PDF and insert the signatyre bytes are the correct point in the file.

Multiple Timestamp services are now allowed

RFC3161 TimeStamp services have a habit of going offline, which can break the signing process. The AcrobatSignatureHandlerFactory now accepts a list of these, for better failover.

Tagging improvements

We've fixed a number of small issues relating to Document Tags in the PDF - first, a few combinations of tags and draw operations were causing exceptions to the process: we've done some exhaustive testing and believe we've now fixed all of these odd cases.

We've also added a couple of minor improvements to make it easier to move pages around between documents while preserving as much of the tag structure as we can.

And finally, we've added support for the PDF 2.0 pronunciation dictionaries, via the custom "phoneme" and "phonetic-alphabet" attributes which can be set on the Elements in the PDF. We haven't yet found a consumer application that can work with these, but we have to start somewhere!

PDF/A-4

"PDF/A-4 support? But that hasn't been released yet." - no, it hasn't. But we know what it's going to look like when it is, which we hope is within the next few weeks. So we've added PDF/A-4 support, but with a draft label on the properties, which we expect to be able to remove in the next release. Use with caution until then. Our online verifier has been updated to include PDF/A-4 as well.

(edit 2020-12-17 - we were just a few days too early! PDF/A-4 was published today)

Summary

Those are the highlights, but as always there's the usual round of small bug-fixes and improvements. Details in the CHANGELOG as always. Download from http://bfo.com/download.