iText 5.1.3 — XML Worker 1.1.1



iText 5.1.3

  • Changes made by Paulo Soares
    • Support for PAdES
      • PAdES timestamp
      • PAdES-LTV: DSS creation
      • Signature validation
    • CMapAwareDocumentFont: some symbol fonts don't have a /ToUnicode entry.
  • Changes made by Kevin Day
    • Parsing PDF for images: refactoring of how filters are applied to streams, adjust parser so it can handle multi-stage filters
    • Parsing PDF for images: allow correct decoding of 1bpc bitmask images
    • Parsing PDF for images: add jbig2 streams to pass through
    • Parsing PDF for images: handle null and indirect references in decode parameters, throw exception if unable to decode an image
  • Changes made by Eugene Markovskyi
    • Bugfix DocumentFont: ascender and descender are now calculated differently, based on experiments with different fonts.
  • Changes made by Bruno
    • XMLUtil: added a method to unescape a String with entities such as ' and ®.
    • XMLUtil: refactoring of the escape method.
    • Added utility to strip all tags from an XML file.
    • SimpleBookmark: it's now possible to add a JS action using SimpleBookmark (code suggestion by Medhat Saleh and Mustafa Saeed; implemented in a more generic way by Bruno).
    • SimpleBookmark: allow SimpleBookmark to create XML from Bookmarks including JS actions.
    • SimpleBookmark: replace references to a deprecated method with a reference to the newer method.
    • ColumnText: convenience method allowing you to define a column using a Rectangle object.
    • ColumnText: extra method to get the number of lines that is drawn.
    • ColumnText: extra method exposing the elements that haven't been processed yet.
    • DocumentFont: extra check: Encoding isn't always a dictionary!
    • See suggestion in bug report #3395487 by sciss: an exception is "eaten" by another one. We should at least pass the real exception to the new exception.
    • There's a problem with PDFs generated with Canon scanners. They have a binary zero in the Producer name. This character is illegal in de XMP stream. To fix this, the XmlSchema.escape() method was deprecated, and replaced with XMLUtil.escapeXML(), a method that removes illegal characters.
    • The /Outlines entry of the catalog MUST BE an indirect reference, but there are some (lousy) PDF producers who use a direct object, resulting in a ClassCastException. We made iText more tolerant towards these PDF producers.
    • Bug reported (and fixed) by Михаил Ледин on the mailing list (September 1, 2011). If startLocation.equals(endLocation) then orientationVector.length() is 0 and orientationVector.normalize() is NaN. Because of this distPerpendicular equals the minimum int value and distParallelStart is NaN. As a result, TextChunk.compareTo() is misleading.
    • Bug reported (and fixed) by Todd Chandler on the mailing list (September 13, 2011). An ArrayIndexOutOfBoundsException occured whenever a PDF with a widths array was encountered where (firstchar + the size of the array) is greater than the widths array of the DocumentFont object.
    • Bug reported (and fixed) by Jan Sorby on the iText mailing list (October 5, 2011). When using extra indentation in combination with tab chunks, wrapping text was done incorrectly.
    • Fixed bug #3307649: Page numbers were shown even if the type for page labels was EMPTY.
    • Fixed bug #3415443: When a document has a font with a /ToUnicode stream and a /Widths array, the width was calculated incorrectly. The widths in the /Widths array reflected the original character values in the PDF, whereas the getWidth() method was asking for the decoded Unicode values. In short: there was a mismatch when trying to retrieve the width of a character.
    • Bugfix: if you want to set a rich text field, it's not sufficient to add an RV entry, you also need a V entry.
    • Bugfix: marked content using a tag without properties could never be balanced.
    • Added missing error-messages in the language file.
    • Removed some unnecessary imports

XML Worker 1.1.1

  • Changes made by Balder Van Camp
    • Added a subclass Value to the Attribute subclass of the HTML class.
    • Better check for CSS link.
    • Reuse the TagProcessorFactory inside XMLWorkerHelper.
    • Changed the accidental rename in StackKeeper of getTag() to getName() back to getTag(), as it returns a Tag.
    • Added FLOAT, RIGHT and BOTTOM to the CSS class for future use.
    • Removed the CssApplier interface. It's no longer used: XYZCssApplier no longer implements CssApplier<T>. Some had different method signatures anyway. XYZCssAppliers are now used through the CssAppliers class which will detect which applier to use. This change makes the css applier classes easier to be used elsewhere by decoupling it from the HtmlPipelineContext.
  • Changes made by Emiel Ackermann
    • Fixed bug #3397508: content placed in a child tag of p-tag wasn't shown if the p-tag contained a xfa tab style attribute.
    • Fixed bug #3413287: The disc symbol of an unordered list was rendered too big and not the same colour as the list content. An ordered list rendered the symbol at the correct size but also suffers the color issue.
    • CssUtils: added a defaultMetric parameter to the method parsePxInCmMmPcToPt. This will allow to set the defaultMetric of numeric values.
  • Changes made by Paulo Soares
    • Bugfix: the wrong Reader instance was used in the parseWithReader method of the XMLParser class.
  • Changes made by Alexander Chingarev
    • Bugfix XMLParser: the InputStream wasn't being reset after detecting the encoding in the detectEncoding() method.