November 13th, 2011· maintenance release that fixes a series of bugs and that allows us to release the new version of XML Worker that depends on iText.
February 4th, 2011Changes made by Paulo Soares:
· Added an event to signal that a table will continue in the next page (adapted from code from Nurettin Dag).
· HTMLWorker: relative cell widths are supported in tables (Samuli Tuomola).
· Tagged XML extraction didn't consider indirect /K objects or page contents with an array.
· PdfStamper: non pdfdocencoding characters were being wiped out from the producer name.
· TiffImage: images with 1 bit per pixel may also use a pallete.
· Added RectangleReadOnly.setRotation() override to throw an exception if a read only Rectangle is changed.
Parsing PDF:
· CMapAwareDocumentFont: Some PDFs have a diff map bigger than 256 characters.
· CMapParser: Fix to read broken ToUnicode cmaps.
· Cache the fonts used in text extraction.
Changes made by Mark Storer:
· Added basic support for rich text values in form fields. No appearance support as yet.
· added support for web hex colors without a leading '#', and some tests.
· The meaning of transparent (0 or 0x00) and opaque (1, 255, or 0xFF) was switched in the WebColors class.
Changes made by Kevin Day:
· PDF parser: handle slightly malformed embedded images
· Changes made by Balder Van Camp
· Clean-up of different classes and methods
· Improved MessageLocalization - removed methods getComposedMessage(...) and replaced with 1 that handles all for unlimited {1} .. {x} replacement parameters
· removing unnecessary brackets
· objects implementing equals should implement hashcode too
· ...
Performance and memory optimalisations:
· calling new Long() or Integer() causes memory allocation .valueOf() is more memory friendly.
· changed creation of Characters in EntitiesToSymbol, EntitiesToUnicode, IanaEncodings
· strings += in loops replaced by stringbuilder/buffer append
· Reorganization of the code
· Separated resources from Java code
· Removed the dependency on HtmlTags in Font used by setStyle(String style)
· Removed dependency on HtmlTags in attempt to separate xml parsing from html parsing to allow creating different modules from different parts of itext.
· Introduced NewLineHandler/NeverNewLineHandler that takes over the task HtmlTags was doing
· New class XMLUtil contains utility methods, some methods previously found in SimpleXMLParser
Changes made by Bruno Lowagie:
· Reorganization of HTMLWorker and related classes
· Patch #3044060 by Nurettin Dag: padding-left was ignored when parsing HTML with HTMLWorker
· Patch #3044063 by Nurettin Dag: bullets generated from HTML need extra space
· Patch #3044071 by Nurettin Dag: making some private variables protected so that users can access them from a subclass.
· Patch #3044077 by Nurettin Dag: When a paragraph containing an image is converted to PDF using HTMLWorker height of the line is calculated only by the size of the text in it. The calculation of lines containing images should consider the image height as well.
· Patch #3044496 by Nurettin Dag: support for table alignment in HTMLWorker.
· Patch #3105516 by Nurettin Dag: Using HTMLWorker if a table has alignment defined it also applied to rows in the table (and it shouldn't).
· Patch #3044568 by Nurettin Dag: Whitespace in HTML isn't always ignored when it should be
· Static final String values for HTMLWorker providers. See suggestion by Keith O. on the mailing list.
· Rewrite of HTMLWorker introducing an HTMLTagProcessor interface
· Adding a new constructor for HTMLWorker taking a Map of tags and HTMLTagProcessor objects
· Replacing hard coded Strings by a static final String.
· Removing ElementTags and Markup in favor of HtmlTags.
· RUPS: XFA Tree should be scrollable.
· Adding a type to the structure element as suggested by Jose (jmrrva).
· Patch #3044413 by Nurettin Dag: sometimes when an image does not fit the current page it is still flushed to that page instead of getting pushed to the next page.
· Patch #3105505 by Nurettin Dag that gives users control over the spacing between image and the line above.
· Patch #3105552 by Nurettin Dag: Y-line value is wrong when a table has a spacing after that extends to below the bottom margin.
· Patch #3105584 by Nurettin Dag: introduction of scaleToFitLineWhenOverflow a parameter that lets you decide if iText needs to scale an image down if it doesn't fit the available width of the page.
· Fixed bug #3114043: when content really doesn't fit a row, iText should throw an Exception instead of printing the error message to the PDF
· Removed the main() methods from GreekAlphabetFactory, RomanAlphabetFactory, RomanNumberFactory, Pfm2afm, Base64, CMapParser and SimplePatternParser.
· Fixed problem with existing OCGs by avoiding a NullPointerException as suggested by R Bolotov on the mailing list (24/01/2011 18:31)
· Added Rectangle and RectangleReadOnly constructors that accept a rotation value.
· Added a setRotation() method that sets the rotation to 0, 90, 180, or 270.
· Added some extra short-cut variables to create page size with Landscape orientation.
July 29th, 2009· PdfPKCS7: More robust timestamp extraction.
· PdfPKCS7: Ripemd didn't work, some kind of signed attributes couldn't be verified correctly.
· PdfStamperImp: Avoid accessing directly member variables from other classes.
· PdfSmartCopy: Check deeper for comparison.
· Rotation in PdfPCell: take mod before making positive.
· Fix NPE when parsing Type 0 fonts without a ToUnicode map (I've seen some winding font entries stored as Type 0 instead of TT in some pdf files)
· Adjusted unicode tcid mapping sit takes the first one found from DocumentFont. This is just a band-aid, as it doesn't address cases where multiple cids may map tsingle unicode value.
· Fix byte tint sign conversion
· Enhance text parsing thandle fonts with encoding but nToUnicode map. Ref Bug #2792227
· PdfPRow: Cheating a little bit more tdeal with a floating point problem (until we can solve this in a more structural way)
· PdfPTable/PdfPRow/PdfPCell: Fix a bug for the new rowspan funtionality
· PdfStamperImp: Solved NPE problems with producer string
· Image in Chunk: Taking intaccount the top border width of the Image in case the leading has tbe changed taccommodate for the image height.
· RtfList: The public void writeContent(final OutputStream result) method needs toutput RtfParagraph.PARAGRAPH_DEFAULTS after every list. Patch posted anonymously tSF (#2809140).
· RtfFont: When adding a paragraph, table cell or other Phrase without specifing the font, by default the "unknown" font is created in the font table. Like: {f3fromanfcharset0 unknown;} Word 2000 doesn't recognise the unknown font and waits indefinately. Patch provided by M. Smith on the SF Bugtracker (#2807621)
March 10th, 2009· 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).
· 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
· 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
· 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.
· 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)
December 20th, 2008· Title and Description should be a XmpArray (patch provided by Katja Sondermann)
· CJKFont: A resource was not closed.
· PdfCopy/PdfCopyFields: The bookmarks were being written twice.
· PdfReader: A fix ttake care of broken PDFs that have whitespaces after "stream" before the LF.
· PdfWriter: Fonts are output in the order they are added.
· PdfGraphics2D: The patch tsimulate bold broke transparency (Bill Ensley).
· PDF-A requires an EOL after obj
· Local gotdoesn't throw exception for inexistent local destination.
· PdfStamper: Creates the SigFlags is there's a signature.
· RtfShape: Fix missing RtfDocument objects. Allows for shape objects tbe added correctly.
· RTF: changed getBytes() tuse DocWriter.getISOBytes(...) for proper byte output.
· Fix image processing for import. Control word shprslt is for Old version of Word andis not supported at this time. Send data tnull destination.
· RTF: Preparing for import intelements.
· Fixed some tags.
· javadoc cleanup: invalid @throws removed
· removed unused imports
· fixed svn keyword substitution
· classes that already allow us tparse a PDF content stream tretrieve text; could form the foundation of more elaborate PDF parsing.
· Includes some classes from fontbox.org (BSD license).
· Bigfix by Mark Storer: rhints not taken intaccount in create method of PdfGraphics2D
· AcroFields: added a new method setListSelection
· Exceptions thrown by XmpReader are now caught(see mails Stepan Rybar November 2008 reporting a problem with PDFs generated using FOP)
· In 2.1.3, I introduced a bug that made the XMP data corrupt andcaused the problem reported by Paul Ryan (on the mailing list, July 28)
· CFFFontSubset: Ulrich Telle solved a problem when subsetting a CFF font(only blanks were displayed when opening the document with Adobe Reader 8 or higher).
· TextField: V was only shown when the value wasn't empty AND a value wasn't required.I think it's sufficient tomit V when the field is empty;the extra constraint that the field may not be required is tostrict.
· PdfPRow: Fixed a problem with setNoWrap(true) in combination with setRotation(180)
· Implementation of multiselect listbox support in XfdfReaderasked for on the mailing list on October 28, 2008
· Fixed a Copy/Paste error mentioned on the mailing liston September 1 2008 by Jean-Christophe Dorchies.
· Bug reported and fixed in the SF bugtracker (#2094155; Carl Freeland):g2.currentFillGState = this.currentFillGState;was missing in PdfGraphics2D.create()
· Fixed a bug reported in the SF bugtracker (#2124088):Broken autnumbering when using a ChapterAutoNumber as LargeElement.
· Fixed a bug reported in the SF bugtracker (#2186356):When a paragraph that contains a PDFPTable gets added tanother paragraph,an IndexOutOfBoundsException gets thrown.
· New method addSignature, based on a suggestion by Michael Klink