Skip to main content
Skip table of contents

Release iText 5.1.0

The release of iText 5.1.0 brings plenty of fixes of bugs reported in the last couple of months. Continue reading to find out more.


Release Notes:

iText 5.1.0 Core

The core iText® library
The first change that jumps to the eye, is that we no longer release "just the jar". You can now download a zip file containing several jars at SourceForge. The most important jars are those with the binaries: itextpdf-5.1.0.jar and itext-xtra-5.1.0.jar. Note that we've split iText in two parts: the core library and extra functionality. In the future, we'll provide even more different modules. Why? Because we're also working on an Android version of iText.

Currently, the Android version is trimmed down to an "iText light" version (no encryption, no parsing,...). We'd like to be able to offer iText as a combination of different modules in the future. For instance: if you don't need PDF 2 functionality, then you don't need to ship the itext-xtra.jar with your application. [If you want to know more about getting the Android version and using it in a commercial app, please contact our sales department. The other jars in the zip file are marked with javadoc and sources, they contain the API documentation and the iText source code.
 

The extra jars


As soon as encryption or digital signatures are involved, you need the BouncyCastle jars. If you need hyphenation, you need itext-hyph-xml.jar. For CJK fonts, itext-asian.jar needs to be in your CLASSPATH. In very, very, very rare occasions, you may also need itext-asiancmaps.jar (if you don't know if you need this jar, you don't need it).

Recently, we've received some reports about inconsistencies between some versions of iText with some versions of BouncyCastle. We were able to reproduce the problem, and we've found out that iText 5.1.0 works best with BouncyCastle 1.46 for JDK15. That's why we've made a version 2 of the extra jars. We've released them as extrajars-2.0.zip.
 

iText RUPS


We've moved the source code for RUPS from the iText project to https://sourceforge.net/projects/itextrups/ In the past, we were using iText ourselves as a tool to debug PDFs, but we've never made an official release. We just ran the tool from our Eclipse environment. People who saw us working with RUPS asked us: where can we find that tool? Can we also use it outside of Eclipse? For those people, we've now made an exe and we've released it as version 1.0.0.
 

XML Worker


As promised, we're investing in the development of a new HTMLWorker. You could already test this functionality using our XML Worker demo. Many people have provided useful feedback through this demo; this allowed us to fix plenty of bugs. We've published XML Worker on https://sourceforge.net/projects/xmlworker/. The first version that was released to the public was 0.9.0, but after some extra tests, we discovered we had overlooked a minor bug, so we've released 0.9.1 immediately after 0.9.0. Chances are that the release cycle of XML Worker will be shorter than the release cycle of the core iText in the next few months.


XML Worker turned out to be a good tool to test iText functionality. If you look at the changelogs, you'll notice that a large part of the code that deals with positioning tables has been rewritten. We've discovered and fixed plenty of bugs involving strange combinations of colspan and rowspan.


For backward compatibility, the old HTMLWorker hasn't been removed from the core iText yet, but as soon as we've written sufficient documentation for the new XML Worker, we'll deprecate HTMLWorker.


More documentation
Now that we've released the long awaited iText 5.1.0, we'll focus on documentation now. All the examples from iText in Action — Second Edition should work with the new version of iText, but we'll have to add some more examples demonstrating the new functionality. We could easily write an extra chapter about the new XML Worker ;-)


Changelog:


iText 5.1.0 Core

  • Changes made by Balder Van Camp

    • Introduced a new structure for the source code (for instance separating resources and data from source code).

    • Mavenization of the source code: POM.xml files
    • Code clean-up:
      • used entry set instead of keyset iterator (PdfDictionary)
      • replaced ArrayList by List (e.g. the getChunks() methods), HashMap by Map (e.g. in SimpleBookmark).
      • Made parameters final in some methods.
    • Bugfix of incorrect implementation of WebColors => The three-digit RGB notation (#rgb) is converted into six-digit form (#rrggbb) by replicating digits, not by adding zeros. For example, #fb0 expands to #ffbb00. This ensures that white (#ffffff) can be specified with the short notation (#fff) and removes any dependencies on the color depth of the display. @see http://www.w3.org/TR/css3-color/
    • Added a profile named osgi that generates OSGi metadata (cf. mail on mailing-list by Pascal Leclercq)
    • Add logging interface and a logging factory for simple logging. Users/developers should register their implementation of com.itextpdf.text.log.Logger to the LoggerFactory. Their implementation can use their favorite logging framework. In itext it can be used in a class like this: private static final Logger logger = LoggerFactory.getLogger(); This was provided for XMLWorker, it's used in xmlworker, but in the future, it could be useful in itext too. Currently it only contains one method 'log' to log things. Could be extended later on to info, debug, error,...
  • Changes made by Paulo Soares
    • TIFF: Fix to read CCITT G3 images.
    • Support for ToUnicode with single byte fonts (Gilles Mazoyer).
    • Temporary fixes to the old HTMLWorker: b, i, sub and sup must propagate font attributes like size, colspan and rowspan can't propagate to nested tables.
    • Ignore Encoding in CFF fonts.
    • Better treatment of unmappable characters (in PdfEncodings).
    • Fixed the problem that subset CFF fonts didn't show up in Acrobat 9 or later.
    • Added support for AES-256 encryption (R=5).
    • Opening an AES-256 encrypted PDF with a null password would throw a null exception. It will now behave correctly and throw a BadPasswordException if the password is wrong.
    • Include all the certificates in the signature (Vroonen Julien).
  • Changes made by Mark Storer
    • Added PdfReader.getPageResources() with JavaDoc and a test to see that it was Actually Working (to some degree).
    • Added support for character spacing, based on request from itext-questions mailing list. Still missing support for a number of Chunk attributes.
  • Changes made by Kevin Day
    • PDF parsing: rudimentary handling of indexed color spaces for determining inline image lengths
    • MessageLocalization was killing backslashes in input strings
  • Changes made by Bruno Lowagie
    • Fixed bug 3147227: TYPE_BYTE_BINARY images forced to Black and White, even if they have more than 1 bpc.
    • Changed listeners from private to protected in Document.
    • Bugfix: the combination of using horizontal scaling and extra character space caused text to fall off the page (bug reported by Emiel Ackermann).
    • Added missing file headers; updated all file headers changing 2009 into 2011, and replacing the vague "you must retain" by "a covered work must retain" in the part about the producer line. The comment sections for the different VERSION constants were changed too to reflect the actual owner of the IP. Also: iText® is now a registered trademark.
    • Added a NumberArray class (for instance as superclass for PdfRectangle).
    • PdfWriter: added a method allowing you to add extra entries to the page dictionary. This method was used to refactor the way transition, duration, thumb images, userunit and pagemetadata are set.
    • PdfTemplate: added a method allowing you to add extra entries to the form XObject dictionary.
    • Moved RichMedia dictionaries to xtra.jar
    • Introduction of Geospatial PDF dictionaries in xtra.jar
    • Complete refactoring of the PdfPTable functionality, in the hope that the code is now more readable.
      This fixed the following problems:
      • due to rounding problems, some lines in tables were duplicated when a row was split: consumeHeight() didn't consume all the content; problem reported by a customer with support contract
      • using rowspan sometimes led to strange results (content went missing); bug reported by Colin Cheng in April 2011
      • skipping the first header didn't work if a Table was the first element added on a page; bug reported by Richard Palmer in April 2011
      • table events weren't working for combinations of rowspan and colspan.
      Caveat: some methods were removed, and setSplitLate() is ignored for rows that have a rowspan.
    • TaggedPdfReaderTool: better error handling when parsing PDFs that aren't tagged

XML Worker 1.0.1

  • Changes made by Balder Van Camp
    • AbstractTagProcessor: changed ThreadLocal to static
    • AbstractPipeline: use getContextKey() where possible
  • Changes made by Bruno
    • It should be allowed to pass paths relative to the workdir to the ImageProvider.

XML Worker 0.9.1

  • Changes made by Balder Van Camp & Emiel Ackermann
    • New XMLWorker and HTMLWorker in separate jar. This will replace the old HTMLWorker in future versions.
      The new XMLWorker will be used to parse other types of XML in future projects.

iText RUPS 1.0.0

  • Changes made by Balder Van Camp
    • RUPS is now released as an exe.
    • RUPS: added an option to give a path to a file as command line argument on launch. (Enabling e.g. for windows: right mouseclick on a PDF file -> open with RUPS, and the file opens)


JavaScript errors detected

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

If this problem persists, please contact our support.