iText 5.1.2 — XML Worker 1.1.0 (August 15, 2011)

iText 5.1.2

  • Changes made by Emiel Ackermann
    • Bugfix: In the PdfContentByte.drawTextField() method, the graphic state was not saved and restored. This caused the default font color to become white, which made all text unreadable.
  • Changes made by Balder Van Camp
    • PdfArray: make Iterable
    • Bugfix: In the PdfContentByte.drawButton() and PdfContentByte.drawRadioField() methods, the graphic state was not saved and restored. This caused the default font color to become white, which made all text unreadable.
  • Changes made by Kevin Day
    • PRTokeniser: Made the algorithm to find startxref more memory efficient.
    • RandomAccessFileOrArray: Improved handling for huge files that can't be mapped
    • CMapAwareDocumentFont: fix NPE if mapping doesn't get initialized (I'd rather wind up with junk characters than throw an unexpected exception down the road)
  • Changes made by Bruno
    • Javadoc clarifications
    • Removed unnecessary imports
    • Bugfix: The height of the Image wasn't taken into account when creating a PdfPCell with an Image. (This bug was introduced in version 5.1.1, due to the "List symbol attributes were ignored" fix)
    • Undo of the suggestion implemented in 5.1.1 regarding the defaults for setUseAscender/setUseDescender
    • Bugfix: Some XFA streams don't have a datasets node. If this is the case, we have to add one.
    • Bugfix: Bug in the signature validation process, discovered by Stefan Santesson (3xA Security). Stefan fixed the bug and has sent the fix to the mailing list on 2011-08-09.
    • PdfPKCS7: Added getters for digestEncryptionAlgorithm and digestAlgorithm as suggested by Stefan Santesson (3xA Security)
    • Bugfix: Problem reported on the mailing list by somebody named Stefan (June 28, 2011).
      A namespace prefix "xmp" caused problems because "xap" was expected.
      The problem was examined by Leonard Rosenthol and Michael Klink.
      Leonard explained that according to the specs "xmp" should be preferred,
      but Michael argued that although "xmp" is preferred, "xap" is allowed.
      In this fix, iText no longer forces the use of "xmp", but tries to detect which namespace prefix is expected.
    • Bugfix: There was inconsistent behavior when using /t characters. iText ignores them when doing calculations, but adds them to the document anyway and they aren't being ignored by some viewers.
    • New functionality that allows you to completely remove an OCG layer (in the extra jar).

XML Worker 1.1.0

We jump from version 1.0.1 to 1.1.0 because there has been a huge change in the architecture of XML worker.
  • Changes made by Balder
    • Javadoc updates
    • HTML: added more tags
    • CSS: added more properties
    • Bugfix: see bug report #3332534 "//s" should be "\\s"
    • Pipeline: added init method, replaces setContext() and getNewCustomContext() methods, and is called automatically in XMLWorker on the XMLParserListener init method call.
    • WorkerContext passed as argument in Pipeline open, text, close, init. Also passed as argument to TagProcessor methods.
    • XMLParser now calls listeners init before starting to read and calls listeners close just before closing the stream/reader
    • CSSResolver now uses ObjectContext
    • CssFiles now has a clear method that will clear al CssFiles marked as non persistent.
    • Added protected createTag() method that is responsible for constructing new Tag objects, add a protected getCurrentTag() method
    • fix a major threading bug. the currentTag is now kept in the WorkerContext, overlooked it when refactoring.
    • Allow attributes without values, they are set in the tags attribute map with an empty string value
    • Add boolean compareTag(Tag t) to Tag.java
    • Made Tag iterable, added getChild(), hasChild(), ... methods (plus recursive tree inspection on demand)
    • Throw exception if InputStream in == null
    • Added protected getLocalWC() to XMLWorker to allow extending classes to retrieve the local WorkerContext object
      and allow extending classes to create their own WorkerContext (e.g one not hold in a ThreadLocal)
    • Bugfix: Namespace was not flushed after detection, all following tags also had the namespace of the last found namespace
    • Added a method to Tag which returns all children with a certain name.
    • Change reading from file to reading with Reader instead of a Stream, an encoding should set now. Reading chars in the parser instead of bytes.
      Passing a string to the pipeline for the content; if no encoding is set, use the jvm's default encoding.
    • Make Tags use statics from Tag
    • Switched Tag.getTag() calls to Tag.getName()
  • Changes made by Emiel Ackermann
    • Javadoc corrections
    • Background-color style is now applied on chunk level.
    • Bug reported by Roel De Nijs concerned fixed cell and table widths is fixed:
      • fixed width of a td tag with a colspan > 1 is now evenly distributed over the columns.
      • if a table has a fixed width different from its columns' fixed widths, the width of the table is taken as target and the columns are widened proportionally.
iText on Twitter
Text on LinkedIn
iText on SlideShare
iText on Google+
iText on Facebook
iText on Pinterest
iText on YouTube
iText on Flickr