iText 2.0.0



  • Changes made by Paulo
    • Certificate encryption. This change has a huge impact on projects that use encryption. All com.lowagie.bc.* packages were removed from the iText jar. You now have to include two BouncyCastle jars into your CLASSPATH.
    • Better certificate parser
    • digital signatures: more certification options.
    • PdfTemplate and PdfAppearance can now be statically created. This also fixes some problems when using PdfStamper where getDirectContent() is not allowed.
    • Another hack to read broken PDF files with strange version numbers in the header.
    • Another fix to read broken tiffs
    • PdfGraphics2D: null handling for hints
    • Simplification in PdfPRow
    • problem with nonbreakingspace and softhyphen: there aren 't any metrics for them in the AFM files. Hotfix by Bruno; more thorough fix by Paulo.
    • RtfWriter and RtfWriter2: avoid calling flush() after closing the stream
    • Bugfix: lest strict object type was needed during signature verifying
    • Bugfix: form flatten failed with an empty appearance dictionary
    • Bugfix: class FontSelector: newline bug was fixed
    • Bugfix: class MappedRandomAccessFile: finalize() would try to close a null channel
  • Changes made by Bruno
    • Added full support for portable collections (PDF 1.7)
    • Added support for GoToE actions (PDF 1.6)
    • New class PdfSmartCopy by Michael Neuweiler and Bruno; improved by Paulo. It needs more CPU and memory than PdfCopy, but generally produces files with a reduced file size (compared to the file size after concatening PDFs with PdfCopy).
    • Lists no longer need a symbol indent. iText can calculate the indentation automatically; with the option of each item having its own indentation, or all items having the same (maximum) indentation.
    • Lettered lists and greek lists can now have more than 26 or 24 items. z is followed by aa, ab, ac,... zz is followed by aaa, aab, aac,...
    • Added a new static method in PdfPageLabels that gives you a String array with all the page labels.
    • Added a method to set the NeedAppearances entry form an AcroForm
    • Bugfix: if a field in an AcroForm is required, its value should not be set; otherwise the form can be submitted without entering a value (the empty string that was set by iText is sent to the server).
    • Solved a problem when adding WMF or PS with PdfStamper (a more thorough solution was provided by Paulo afterwards)
    • Bugfix: PdfPTables wrapped in a Paragraph were still causing troubles with newlines and alignments
    • ChapterAutoNumber used a static value to keep the chapter number, this wasn't a good idea; I changed this.
    • Added support for Paragraph.setFirstLineIndent in document.add(Paragraph p); formerly this was only supported in combination with ColumnText.
    • Extra method to add the name (NM) of an annotation
    • Bugfix: class Barcode: inkspreading was not set
    • PDF 1.7 brought new preferences concerning printing (Duplex, Simplex, number of copies,...). All these new preferences are now implemented, including some other (1.6) preferences that were overlooked in previous iText versions. The constants defining the preferences have changed, and there's a new method to set key/value preferences (instead of setting the preferences bitwise). Because of these changes, you will have to recompile your own source code if you want to upgrade to iText 2.
    • iText and SEAM:
      iText is now being used in jBoss SEAM, and after informing with Norman Richards (who developed the PDF package in SEAM) I added some methods to iText:
      • A helper method for jBoss SEAM :convert a String with entities to a normal string (with unicode characters)
      • ElementTags: You can now convert an alignment String to an alignment value
      • PageSize: there's a method in the toolbox that translates a String to a Rectangle, but I rewrote a method by Norman Richards that has more potential. My method could only translate Strings like "A4" and "LETTER" to a corresponding Rectangle; with Norman's method you can also use Strings like "400 600". I adapted the method so that "166.66 333.33" are also allowed.
    • Entities: Integer values were changed to Character values (because that makes more sense)
    • I completely revised the code in DocListener/PdfWriter/PdfDocument. This means that:
      • I changed the order of the methods these classes, and added extra comments to the source code, so that we now have a better view on what every method does. The readibility of the code has improved. This is a work in progress. More changes will follow in iText 2.0.1.
      • Method clearTextWrap was moved from DocListener to PdfWriter/PdfDocument. I'm not sure what the method does, but it was PDF only, so it didn't have to be in DocListener.
      • Except for the ElementListener inferface (a super-interface for DocListener), no method in DocListener throws a DocumentException anymore. This was a result of a suggestion made by Andrew Binstock concerning the newPage() method.
      • I made different new interfaces that make it more clear how to set encryption, viewer preferences, PDF/X Conformance,...
      • When the PDF version is set automatically to a value that is higher than the default (for instance because new functionality was used), we now check if the current version isn 't higher already. It is now also possible to change the version after the header was written. In this case the version number is added to the catalog dictionary.
      • The method getMaxSize wasn't used anyhere; it may be a remains of the Erwin Acherman code (July 2002.0). I removed it, and introduced a method addToLine that probably does more or less the same.
    • Toolbox: bugfix by Carsten Hammer: the value for the srcfile (corresponding with a key containing the filename) was wrong
    • Toolbox: Carsten Hammer added some functionality to sort the Versions
    • Toolbox: Carsten added more JavaDoc info to the Watermarker plug-in
    • Moving around code:
      • SimpleXMLParser and related classes were moved to com.lowagie.text.xml.simpleparser. Some lists that were inside SimpleXMLParser (entities and IANA encodings) were moved to separate classes outside HTMLWorker
      • com.lowagie.text.Entities moved to com/lowagie/text/xml/simpleparser/EntitiesToSymbol
      • com.lowagie.text.markup.MarkupTags moved to com.lowagie.text.html.Markup
      • com.lowagie.text.markup.WebColors moved to com.lowagie.text.html.WebColors
    • Removal of old classes/functionality; this can cause your applications to break, but you weren't supposed to use any of these obsolete classes, so chances are there will be no problem with these issues. If you do have problems, please follow the following instructions:
      • class XmlWriter: the output of this class, and everything you could do with this output, didn't meet our standards. The code is still available in CVS if you really, really need it.
      • class Graphic: if you were still using it: use direct content and/or PdfTemplate instead.
        TODO: the <hr> tag doesn't work anymore in the XML parser.
      • class Watermark: if you were still using it: use page events instead.
      • class MarkupParser: some methods were kept in another class, but the MarkupParser itself was never finished, and is now being abandonned.
      • interface MarkupAttributes: this interface could only be used to add markup attributes to HTML output. This was completely refactored. If you want to add attributes to an HTML file, you should now use MarkedObject and/or MarkedSection. These new classes will probably also serve for enhanced tagged PDF support in the future.
        Removal of this interface affects almost all basic building blocks. You will have to recompile your code if you decide to upgrade to iText 2.