iText 2.1.5



  • Changes made by Paulo Soares
    • PNG image not rendered correctly in PDF if it had transparency (two bug fixes by Patrick Valsecchi: SF Tracker/Patches #2305344 and #22543141).
    • PDF manipulation: Call Deflater.end() to free non JVM resources (memory issue reported by Eoin Mallin on the mailing list December 23, 2008).
  • Changes made by Xavier Le Vourch
    • Adding missing @since tags.
    • Different code clean-ups: deprecated warnings, javadoc warnings,...
    • Replacing class casts with the appropriate getAs method (getAsNumber(), getAsString(), getAsArray(),...)
    • Bug fix: ClassCastException in AcroFields.setFields(XfdfReader xfdf)
    • Setting svn keywords properties on new files
  • Changes made by Kevin Day
    • PdfContentStreamProcessor: Made text matrix private, and exposed via member method; this allows users to sub-class the stream processor from a different package and gain access to it's internal state.
    • PdfContentReaderTool: added ability to specify output filename; added optional command line parameter to specify page number to analyze.
    • CMapAwareDocumentFont: Added special handling if the font specifies 0 width for space character
  • Changes made by Mark Storer
    • Indirect Objects now keep a reference to the direct object. This is a WeakReference for all PdfIndirectObjects and PRIndirectObjects that are associated with a PdfReader in partial mode. The speed when reading/stamping PDFs is up with 2%.
    • Add support for marked content objects, primarily used to set structure-based tab order in fields.
    • Made it possible to remove getArrayList from the public interface of PdfArray at some point in the future.
    • Bugfix RUPS: corrected the captions of some objects
    • Bugfix PdfWriter.setOutputIntents(): when an ICC destOutputProfile was specified, the resulting PDF was missing a required PdfNumber in the resulting PdfStream, the number of colorants (PdfName.N).
    • PdfWriter.setOutputIntents(): introduction of a more efficient version of this function that takes an ICC_Profile parameter rather than byte[]. The byte[] version must call the ICC_Profile version anyway, so the caller can save themselves some effort.
    • AcroFields: mprove type safety/convenience of AcroFields.Item class.
    • Applied getAs* in AcroFields.
    • Bugfix AcroFields: removeField wasn't updating Item.tabOrder.
  • Changes made by Bruno Lowagie
    • Bernd Oliver Sünderhauf replaced deprecated calls in PdfAction, PdfCopy, PdfStamperImp, PdfAcroForm, PdfAnnotation, PdfCopyFieldsImp and PdfAnnotationsImp.
    • Possibility to force a font file to be read and kept into memory. See mailing list post by Luke Quinane on February 11, 2009.
    • Code optimalizations (Java coding style, Javadocs, refactoring away duplicate code, spelling errors) in the classes Table, SimpleTable, SimpleCell, PdfPTable, PdfPRow, PdfPCell, ColumnText, PdfName, PngImage, Rectangle, RectangleReadOnly, TextField, PdfObject, PdfDictionary, PdfArray, PdfNull, PdfString, PdfNumber as suggested by Bernd Oliver Sünderhauf in different patches on the SF tracker.
    • TextField: separated the lines obfuscating a password by asterisks (*) out of TextField.getAppearance() to a separate public static function. Made TextField.removeCRLF() public as suggested by Bernd Oliver Sünderhauf (Tracker #2625725)
    • PdfPCell: extra method hasFixedHeight() and hasMinimumHeight() as suggested by Bernd Oliver Sünderhauf (SF Tracker #2634444)
    • Bugfix: the method PdfPTable.getFooterHeight wasn't correct (Fix by Bernd Oliver Sünderhauf; SF Tracker #2628092)
    • Bugfix: PdfPTable.deleteRow() didn't decrement headerRows (and possibly footerRows) if a header or footer row is deleted. (Fix by Bernd Oliver Sünderhauf; SF Tracker #2628145)
    • Support for the /Tabs key in the page dictionary; the /Tabs key is responsible for defining the tab-order of the form fields on a page.
    • Support for JBIG2 Images; code contribution by Nigel Kerr (SF Patch #2464690); adapted by Bruno (for instance: support for JBIG2Globals).
    • Support for HR in HTMLWorker; code contributed by Steve Carrow (SF bug tracker #2579073)
    • Bugfix: The validity checker (Acrobat) expects that DR is a standard Resources dictionary and flags (as a WARNING) any key (for instance /ENCODING) that isn't defined in the PDFRef. It doesn't make it wrong/invalid - but Adobe's syntax checker will flag it. Fix posted on the SF tracker #1851980 by Rodolphe Cardon.
    • Bugfix PdfLine: in some cases, an Image wasn't added to the line. It just disappeared (problem reported by Steve Carrow on the mailing list February 5, 2009).
    • Bugfix PdfStamper: the /P key of an annotation pointed to the wrong page if an annotation was added on another page than page 1 (problem reported on the mailing list February 12, 2009)
    • Bugfix: ColumnText didn't take the image height into account when defining the leading (problem reported by Dario Geier on the mailing list on February 5, 2009).
    • The SimpleXMLParser now ignores ignorable whitespace (as asked by Dominic Maricic)
    • HTMLWorker: support for the value "normal" as "line-height". In this case, the leading is 1.5 (suggestion by Steve Carrow on the mailing list February 4, 2009 and SF Tracker #115255; the actual implementation is different from the patch).
    • Font.setStyle() wasn't a real setter. Now it is. This could break existing code, but so be it. None of the examples depended on the old behavior.
    • Bugfix: a NullPointerException was thrown when you created a javascript action before document.open() and with the JS string longer than 100 characters. Reported by alexmj chan on SourceForge (bug #2563170)
    • XMP: changed pdf:Keywords to pdf:keywords (as defined in the PDF/A specs)
    • Deprecated spacingBefore() and spacingAfter() in favor of getSpacingBefore() and getSpacingAfter(). See suggestion by Andrew Binstock on the mailing list 2008-02-01.
    • SF Tracker / Feature request 2282587: introduction of some typed exceptions that are thrown when reading a PDF file. Instead of just throwing an IOException, you now get a BaddPasswordException, InvalidPdfException or UnsupportedPdfException.
    • Code contribution Holger Plankermann on the mailing list (2009-01-21); inspired by Paulo; code cleaned up by Bruno. Functionality: allows to take an existing PDF without a form and to add a form present in another existing PDF.
    • SF Tracker/Patch #2357539: support for actions in FdfWriter (contributed by Philippe Laflamme)
    • Feature request #2431671: replacing HashMap by Map in the setFieldCache method.
    • Bug report #2393346: In the constructor for XfaForm, the XFA DOM is parsed, and the tree is scanned to find templateNode and datasetsNode; templateSom and datasetsSom are built from those respectively. This processing also had to take place when one calls XfaForm.setDomDocument(Document), but it didn't. Fix contributed by Ken Geis.
    • Markup: Removed duplicate code; also: when getting an RGBColor, null is returned if the name of the color is invalid. (This used to throw an IllegalArgumentException.)
    • PdfCopy: added a method that allows you to add blank pages (asked by Angelo Borsotti on November 11, 2008).
    • ColumnText bugfix: one regular column may not set simple to true if there was at least one irregular column; also you can't just choose any value as TOP for irregular columns.
    • MultiColumnText: extra addText methods to allow you to stay in text mode (as opposed to composite mode) when adding Chunks and Phrases.
    • SpecialSymbol: wrong code for the letter Phi (Reported by Carsten Siedentop)