Legacy notice!

iText 5 is the previous major version of iText's leading PDF SDK. iText 5 has been EOL, and is no longer developed. Switch your project to iText 7, integrating the latest developments.
Check related iText 7 content!

Two months have passed since iText 5.5.1 and we're ready to release iText 5.5.2. Although the changelog may seem relatively short, there's one line in specific we've put a lot of effort into: Major improvements to the CSS parser. This is actually a complete rewrite of the CSS functionality, resulting in much better interpretation of CSS syntax. You'll find these changes in iText's XML Worker. The HTMLWorker class that was shipped with iText core was finally deprecated.

iText 5.5.2 Core

We noticed that many people are starting to be aware of Tagged PDF, PDF/A and PDF/UA. We received numerous questions on the subject of merging Tagged PDFs, more specifically PDF/A compliant documents. This wasn't supported in previous versions and it's also kind of tricky because you can't just mix the different flavors of PDF/A. For instance: you shouldn't expect that a PDF/A-1B document merged with a PDF/A-2A document will result in a PDF/A-2A document. Nevertheless we've added a class PdfACopy that allows you to make combinations that make sense and that throws an exception when you're trying to make a combination that doesn't.

We made sure that you can't use the PageStamp functionality when using PdfCopy in tagged mode. This way, we avoid that people don't introduce untagged data out of ignorance regarding the nature of Tagged PDF. PdfCopy now also supports merging fields with tags.

When parsing documents with Type 3 fonts, we used to return space characters because Type 3 fonts are user defined fonts where a random character is mapped to a custom made glyph. We've changed this so that iText returns the characters that were stored inside the PDF. This doesn't always make sense because it can result in a set of random characters, but it is more in line with what people expect when parsing a PDF file that contains Type 3 fonts.

Finally, we've introduced functionality to cache objects to improve the PDF writing process, and we've improved the generic testing framework.

iText 5.5.2 Core

  • Changes made by Alexander Chingarev
    • Improved generic testing framework (GenericTest, WrapToTest,...).
    • Added a method to PdfContentByte that allows you to add a Form XObject using a stream, a name and the coordinates of the CTM.
    • PdfName.ON was changed from "ON" to "on" by mistake in one of the previous release. This has now been fixed.
    • Officially deprecated PdfCopyFields.
    • Officially deprecated HTMLWorker.
  • Changes made by Pavel Alay
    • Added PdfACopy class for coping PDF/A documents.
    • PdfWriter: add cacheObject() method.
    • PdfCopy, PdfAWriter, PdfAStamperImp: improve cache logic, overriding PdfWriter's cacheObject() method.
    • Improved generic testing framework (GenericTest, CompareTool,...).
    • Prevent the use of PageStamp when using PdfCopy in tagged mode.
    • Added support of FDF setJavaScriptAction().
    • WebColors: change transparent color to (0xff, 0xff, 0xff, 0x00).
  • Changes made by Eugene Markovskyi
    • Fixed a bug that caused a StackOverflowException when copying forms. The fix was suggested by Michael Klink on Stack Overflow.
    • Moved method PdfCopyForms.copyDocumentFields() to PdfCopy.
    • Fixed a potential NPE in PdfBody.Add().
    • Fixed incorrect processing of the Standard Type 1 Symbol and ZapfDingbats fonts (glyph mapping / encoding issue).
    • Restoring Tab functionality where a tab switched to the next line when the previous content risks to overlap with the new content. Solved some problems in case a tabs "overflows".
  • Changes made by Alexey Subach
    • PdfCopyFields and PdfCopy: now we also create the Tag structure when merging fields (this wasn't supported in the past).
  • Changes made by Raf Hens
    • Added translations for error messages.
    • Improved PdfAWriter.addFileAttachment() by adding a new method with an extra parameter.
  • Changes made by Michaël Demey
    • Implemented a suggestion by Bennie Lohr to move a super.close() call in PdfWriter to a finally clause so that the method is called even if an exception occurs.
  • Changes made by Amedee Van Gasse
    • Unchecked parameter input in WebColors caused NoSuchElementException.
    • Overall improvement of the testing environment.
  • Changes made by Bruno
    • GifImage: added an extra close() so that an InputStream is closed. This bug was reported by Manfred Neundlinger on Stack Overflow.
    • Added an entry to PdfName for Associated Files (AF).
    • In case of a Type3 font, we now just show the characters as is (before we showed nothing). Note that this change doesn't always make sense: Type 3 fonts are user defined fonts where arbitrary characters are mapped to custom glyphs. For instance: the character a could be mapped to an image of a dog, the character b to an image of a cat. When parsing a document that shows a cat and a dog, you shouldn't expect seeing a cat and a dog. Instead you'll get b and a. That doesn't make sense in this context, but at least you get two different characters.

XML Worker 5.5.2

  • Changes made by Pavel Alay
    • Major improvements to the CSS parser (complete rewrite of the functionality resulting in much better interpretation of CSS syntax).
  • Changes made by Alexey Subach
    • Better support for the [blockcode]<blockquote>[/blockcode] tag.
    • Better support for underlined and strike-through text.
  • Changes made by Eugene Markovskyi
    • Div width is not limited by page width from HtmlPipelineContext.
  • Changes made by Michaël Demey
    • Avoiding a NPE in the Table class.
  • Changes made by Bruno
    • Avoiding a NPE in the Table class.

XFA Worker 5.5.2

(This is a closed source project on top of iText and XML Worker)

  • Changes made by Alexander Chingarev
    • ComplexResolver renamed to FlattenerContext.
    • Added XFA Signature flattening.
    • Fixed a problem where text got duplicated.
  • Changes made by Eugene Markovskyi
    • Fixed inconsistency where the PDF resulting in a different page count, depending on the view mode (print vs. screen).
    • Fixed value formatting issue: empty zero pattern(zero{}) was not applied to zero values.
    • Added an interface for configuring which JS events should be evaluated.
    • Impove support of SOM expressions in JavaScript resolveNode; JS sentences like "this.resolveNode("$")".
    • Improved JavaScipt interpretation for some text fields that weren't rendered properly.
    • Fixed incorrect processing of the Standard Type 1 Symbol and ZapfDingbats fonts (glyph mapping / encoding issue).
    • Fixed a problem with tables widths in case of documents with landscape orientation.
    • Fixed performance regression problem for specific types of forms when upgrading from XFA Worker 5.4.5 to 5.5.1.
    • Fixed a problem in XFAFontProvider that caused some fonts not being used.
    • Fixed incorrect processing of nested paragraphs.
  • Changes made by Pavel Alay
    • Fixed an issue where a wrong font was selected in some specific cases.
  • Changes made by Alexey Subach
    • JavaScript to hide fields wasn't evaluated. This has now been fixed.
    • JsTree: the index lookup was refactored to be consistent with the C# version.
    • Incorrect flattening in case there were several fields with the same name: they all got the same value: the first value in the sequence. This has now been fixed.
    • Fixed incorrect flattening of a combo box.
    • Fixed incorrect box height of a field with an empty caption.
    • JavaScript improvement and arc elements.
    • Fixed several problems with Right to Left (RTL) writing systems.
    • Several fixes regarding images: fix nextPageArea retrieving, draw vs field elements, z-layer priority in PageAreas, image aspects.