Skip to content

iText Core/Community 8.0.2

Compare
Choose a tag to compare
@StryhelskiAndrei StryhelskiAndrei released this 25 Oct 15:06
· 379 commits to develop since this release
8.0.2

Just in time for Halloween, here's a new release of your favorite open-source PDF library for Java and .NET. There's nothing spooky about: iText Core version 8.0.2 and the updated iText Suite add-ons in this release though! Let's take a closer look.

PDF/A-4 support

First and foremost, we've extended iText Core's support for the creation and validation of PDF/A compliant documents to include the latest PDF/A-4 standard. PDF/A-4 is based on the PDF 2.0 specification, unlike the previous PDF/A-3 standard which was based on PDF 1.7. This means it allows some of the new features of PDF 2.0, such as page-level output intents for accurate color interpretation, an updated Unicode version, and improvements to Tagged PDF.

The a ("Accessibility"), u ("Unicode") and b ("Basic") conformance levels in earlier variants of PDF/A have been replaced by two new profiles: e and f. The PDF/UA format now exists for Universal Accessibility, and Unicode is now a requirement in PDF/A-4 for text encoding rather than a specific conformance level. Therefore, the base PDF/A-4 specification replaces the b and u conformance levels.

PDF/A-4e (Engineering) replaces the old PDF/E standard for technical documents, and supports Rich Media and 3D annotations, PDF/A4f allows any type of file to be embedded, similar to PDF/A-3, and builds upon PDFs existing container format capabilities.

In addition, PDF/A-4 has better support for the archiving of fillable forms than PDF/A3, since non-static content is now allowed in the form of JavaScript. Therefore, information about interactive forms can be both stored and archived.

Plus, it simplifies the handling of digital signatures. Which leads us nicely into:

Digital signing

We continue the digital signature revolution we introduced with iText Core version 8.0 with a significant improvement which allows signing to be performed in several steps, rather than as a single operation. This can be especially useful to facilitate concurrency and manage resources efficiently in batch operations. The new deferred signing API already allowed this to some degree, although it required users to manually implement IExternalSignatureContainer themselves -- which is no longer necessary.

There's also a nice improvement for the appearance of digital signatures. Now, the generation of the appearance of signature form fields is delegated to the layout module rather than being manually implemented in the PdfSignatureAppearance class, enabling completely customizable appearances. This means the old layer-based approach is outdated, and has been deprecated.

In relation to a pull request, we added support for signing with the SM2/SM3 algorithms which are becoming more commonplace in China. This didn't quite make it into the 8.0.2 release, however it is available in the latest SNAPSHOT release. You can find an example in the above pull request which is a neat demonstration of how you can take advantage of the algorithm-agnostic signing and validation from the 8.0.1 release.

In addition, with this release we're introducing a new higher level API for signing with PAdES. We're still working on the finer details so it's not quite ready for prime-time yet. However, it's fully-functional so you use it for testing, and get a sneak peak at how it simplifies the digital signing process. Stay tuned for future releases to see further strides in digital signing.

Annotation flattening

There are some nice changes to annotation flattening, where we've implemented a high-level API to simplify and enable easy customization of annotation flattening. You can either tell iText to flatten all annotations with just two lines of code, or if you prefer you can define specific types of annotation to be flattened. The power is now at your fingertips.

Bug fixes and miscellaneous

There's also some miscellaneous improvements and fixes for the layout module relating to table row and cell properties, as well as fixes for a potential infinite loop with tables. We've also fixed an issue where a maliciously crafted PDF with a huge number of pages and empty data structures could cause an out of memory error. Now iText will avoid such issues by more intelligently allocating memory for documents like this.

New Features

PDF/A-4 family support

  • Introduced higher level signing API
  • High-level API for annotation flattening

Improvements

  • Create default implementation for IExternalSignatureContainer
  • Signature appearance improvements

Bug Fixes

  • KeepTogether property set on table might lead to infinite loop
  • PDF with Missing Dict Causes Exception
  • Incorrect processing of table cells with large rowspan occupying more than one page
  • Row span doesn't carry the Cell color to next page