Skip to main content
Skip table of contents

Release iText 5.5.1

For this release, we've invested in even more development of XFA Worker, including tagged PDF functionality. Offering the possibility to generate PDF/A and PDF/UA documents from XFA forms. We have introduced a conformance level that allows you to create documents that are in compliance with the ZUGFeRD standard.  We have also fixed a number of bugs in XML Worker and RUPS.

Release Notes

XFA Worker 5.5.1

About a month ago, Adobe announced that it would never support XFA forms in Adobe Reader on mobile platforms (see blogs.adobe.com on April 16, 2014). XFA forms are much more dynamic and interactive than ordinary PDF forms (AcroForms) and some mobile operating systems place restrictions on what can be done on a mobile device.

This makes it very difficult (impossible actually) to provide the same dynamic PDF experience you expect on the desktop across all mobile devices using PDF. As a result, Adobe Reader Mobile does not support XFA based PDF’s created in the LiveCycle Designer and it will not provide this support in the future.

Does this mean XFA is no longer important? On the contrary! A year ago, our colleagues at IDR Solutions already explained why XFA is important on their blog.

But then how are we going to present these forms on mobile devices?

There are basically two options. Adobe and IDR Solutions offer the interactive solution, converting XFA to HTML 5 for consumptions on the mobile device. We offer the non-interactive solution, where we flatten the XFA form into an ordinary PDF document that can be viewed in any PDF viewer. The former solution is recommended when the form needs to be dynamic and when you need the form to respond to user input; the latter solution is recommended when you want to display, archive, secure the data in the form.

When you look at the changelogs of iText 5.5.1, you immediately see that we've invested in even more development of XFA Worker.

Now that XFA Worker creates Tagged PDF, our customers started experimenting with the generation of PDF/A and PDF/UA from XFA forms. This resulted in some extra enhancements and bug fixes. For instance: we discovered that we didn't fully support PDFs that comply with PDF/A as well as PDF/UA from XFA. This is now fixed.

ZUGFeRD

Apart from further PDF/A enhancements, we introduced a conformance level that allows you to create documents that are in compliance with the ZUGFeRD standard (for instance: invoices). The ZUGFeRD standard is a superset of PDF/A-3 where you combine a human-readable PDF with a machine-readable XML attachment.

XML Worker and RUPS 5.5.1

Talking about XML: We have also fixed a number of bugs in XML Worker. Some combinations of tags gave odd results, and there was a problem with tables and rowspans.

As we speak, the ISO committee for the PDF standards is meeting in South-Africa. One of the new standards that is being discussed involves XFDF. This new standard introduces much needed documentation for the Forms Data Format in general. We noticed that FDF is used quite frequently and we added some new functionality.

Important: the input source is no longer closed automatically when using FdfReader; you're responsible for closing that stream in your code.

Finally, we still find ways to improve RUPS. Not a day goes by without us using RUPS to look inside a PDF.

Changelog

iText 5.5.1 Core

  • Changes made by Alexander Chingarev

    • Fixed incorrect element tagging when a template image is added to the document.

    • Added pdfaExtension schema to XMP metadata in order to add support of the PDF/A-* and PDF/UA standard simultaneously in a single PDF document.
    • New functionality: Image and PdfTemplate can now be added to FDF file as field values.
    • Bugfix: FdfReader should not close input source automatically. Otherwise we cannot read stream data. Important consequence: you are now responsible for closing the input source in your code!
  • Changes made by Pavel Alay
    • Bugfix in PdfAChecker: there was an issue with PDF/A validation of PRIndirectReference objects.
    • TaggedPdfReaderTool: removed dependency on java.nio.charset.Charset to avoid issue with default charset on linux.
    • TaggedPdfReaderTool: add alt attribute of tag structure to output xml.
    • TaggedPdfReaderTool: fix issue with null-symbol in alt text attribute.
    • CompareTool speedup, add compareByContent() method.
    • CompareTool: fix issue with comparing tag structure.
    • CompareTool: fix issue with PdfBoolean and PdfArray comparing.
  • Changes made by Eugene Markovskyi
    • Refactoring of the verification of output intents in the Pdf/A checker classes.
    • When a Chunk is a link, tagged PDF requires that an accessible attribute is added. We also add alternate text for link annotations.
    • Tagged PDF and form fields: widget annotations can now be tagged.
    • Better support for gradient colors
    • LAB color space support
  • Changes made by Alexey Subach
    • Fixed link comparison in CompareTool: we compare the pages the links refer to, not the page references. We don't compare if the links are external. We compare the boxes of the links and simple parameters (all except dictionaries, arrays and indirect references).
    • Added a new setType(PdfArtifact.ArtifactType) method for PdfArtifact and throw an exception in setType(PdfString) if the string parameter is not a valid artifact type.
    • FDF: added status message functionality
    • Added support for the ZUGFeRD standard (which is based on PDF/A-3)
    • Bugfix for creating PolyLine annotations (actually fixing a typo).
    • Added a missing break; statement in PdfAXmpWriter
  • Changes made by Raf Hens
    • XMP: ignore empty or whitespace only keywords.
  • Changes made by Michaël Demey
    • Bugfix CompareTool: check to prevent NullPointerException; new File(compareExec).exists(); throws an exception if compareExec is null.
    • Flattening a form would overwrite AP streams of annotations when it shouldn't. Reverting a commit from February 8, 2013 fixed this issue.
    • Replaced redundant code with a call to the keepRowsTogether() method and updated its Javadoc comments to include thrown exceptions.
    • An issue with "ImageMasks that have uncompressed bitmap data" was reported on the mailing list. User Darren correctly pointed out that 0 can be a whitespace. Added additional checks on ch == '0' in the readLineSegment() method. This method was being called from two places: rebuildXref() and checkPRStreamLength().
    • Fixed the formatting of the checkPRStreamLength().
    • Fixed a bug that cut off rows of nested tables even though they fitted in the available space. The culprit was rowsNotChecked not being copied in a PdfPTable.shallowCopy() method.
    • Fixed a problem regarding invisible signatures. For the full explanation, see the mailing-list discussion Possible bug on PdfSignatureAppearance. We accepted the proposal made by Emanuele Paterna.
    • Bugfix regarding spacing before and after when a new page is created.
    • bugfix TIFF: "EOL code in white run" threw an exception when it could end reading the white run. Also avoided an ArrayIndexOutOfBoundsException.
  • Changes made by Bruno
    • Avoiding a NullPointerException in PdfReader: you can't read a stream that is null.
    • Bugfix: When compressing a stream that was already compressed using at least one different filter, the FlateDecode key needs to be added first.
    • New Image functionality: Suppose that you have a JPEG image, then the filter used by iText will be /DCTDecode. Suppose that you want to compress the image even more, then you may want to add /FlateDecode as a filter. This is no possible by choosing a compression level different from "default compression" and "no compression".
    • New AcroField functionality: it is now possible to set the value of /AS if the normal appearance doesn't provide two states to choose from.
    • Bugfix PdfA1Checker: the value of outputIntentDictionary was checked for a null value at a point that could never be reached if outputIntentDictionary was null: a NullPointerException would have been thrown when getting the value of the /S entry. (This was eventually refactored by Eugene.)
    • Added an extra method to add JavaScript to PdfStamper as explained on Stack Overflow.
    • Added a method to define the rendering intent to PdfContentByte (to complete the list of general graphics state operators).
    • In PDF 2.0, inline images will be limited to images of maximum 4 KB. We've already anticipated and added the new /L key (specific to PDF 2.0). We've put the code that throws an exception in a comment section, just so we don't forget when we work on PDF 2.0.
    • Implemented a suggestion made by Vahid Nasiri who says that dropping formatting chars causes problems in FontSelector. Alexey Subach improved the fix.

XML Worker 5.5.1

  • Changes made by Michaël Demey

    • Code contribution by a customer, Arnost Havelka (SUP-425), fixing a problem when parsing table tags. The fix worked, and Michaël added some extra fixes on top of the suggestions by Arnost Havelka: cells with a rowspan wouldn't be skipped on the calculation of the widths of the second (and other) row.

    • Bugfix: [blockcode]<!---->[/blockcode] wasn't recognized as a closed comment block and kept writing the rest of the html file to memory().comment().
    • changed the value of TBODY to "tbody" instead of "thead"
    • bugfix: [blockcode]<b>[/blockcode] inside a [blockcode]<p style="font-weight: normal">[/blockcode]  tag was overridden
    • bugfix: [blockcode]<small> [/blockcode] and [blockcode]<big>[/blockcode] inside a [blockcode]<p> [/blockcode] tag resulted in subtracting 1 from the parentSize, which was -1 (Font.UNDEFINED), which resulted in inverted text

iText RUPS 5.5.1

  • Changes made by Michaël Demey
    • Cleaning up unused objects before saving a file.
    • Fixed a problem when visualizing streams that don't consist of PDF syntax. These used to cause an exception in the syntax highlighter, now they are shown "as-is" (possibly illegible binary data).
    • Show warning before you're about to overwrite a file (giving you the opportunity to cancel the operation).
    • Reload file on save.
    • Code optimization: using loadFile() instead of new PdfFile() in the RupsController class.
    • Adding drag and drop functionality to open a PDF file in RUPS.

XFA Worker 5.5.1

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

  • Changes made by Raf Hens

    • Renamed "licensekey" to "itext-licensekey" (Customers informed us that "licensekey" is too generic and thus confusing in large projects)
  • Changes made by Alexander Chingarev
    • Added "Read Out Loud" and "Tool Tip" element support
  • Changes made by Eugene Markovskyi
    • Implemented if / then statements in FormCalc
    • Fixed a specific XFA flattening problem regarding page area definitions.
    • FormCalc: Implemented "round", "abs", "date", "time", "time2num" methods
    • FormCalc: Ignore non-numeric values in the numeric expressions
    • Improvements to solve a problem of slow flatten times and large file size output with specific templates
    • Bugfix: table cell bounding box correction, after splitting at bottom boundary of page
    • Avoid tagging of elements that don't need to be tagged: tag graphical elements as artifact.
    • Improve tagging of nested DIV elements. Replace the DIV by Section when appropriate.
    • Bugfix: XFA Worker wasn't flattening Radio Button List items correctly
    • Flattening of check boxes (and some other interactive elements) as AcroFields. Prototyping / implementation based on what we expect to be defined in ISO-32000-2. This is experimental code!
    • Fixed a time-zone issue that caused the tests to fail when changing to Summer-time.
    • Added support for the Validate element script
    • Implemented instanceManager for JS element
    • Adding dataSet structure to XFA JS element.
    • Support for barcode element type 'code2of5interleaved'
  • Changes made by Pavel Alay
    • Added round border support; added raised, etched and embossed borders
    • Clip fill region in case round borders
    • Fixed issue with embossed borders and check box
    • Bugfix: resolved issue where a subform's height attribute was ignored
  • Changes made by Alexey Subach
    • Minor change in FormCalc grammar.
    • Bugfix: return null if no properties are found for JsObjects
    • Bugfix: fix a DateTime field issue
    • Optimization: use Map interface in a flatten method instead of HashMap
    • Add possibility to choose ViewMode before flattening
    • Fix for a Positioner's compareTo() method bug (found during the porting)
    • Fix Incorrect JavaScript evaluation
    • Added new XFA Scripting methods for working with field items.
    • Add getter for selectedIndex property, modification of script evaluation.
    • JsTree modification: added empty node list to every JsTree element in constructor. It should be possible to access for instance [element].nodes.length property, even for an element without children.
    • Bugfix FormatResolver: trim the patterns before trying to parse a number.
    • Avoid creating a JsNode with null parent.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.