iText 5.4.2 — XML Worker 5.4.2



iText 5.4.2

  • Changes made by Paulo Soares
    • Improved ArabicLigaturizer by replacing a binary search with a HashMap.
    • Added support text extraction for CJK fonts with Identity-H encoding and a known ordering.
  • Changes made by Kevin Day
    • Added a method to create a RandomAccessSource from an existing file channel to RandomAccessSourceFactory
    • Added an isChunkAtWordBoundary() method to LocationTextExtractionStrategy to check if a space character should be inserted between a previous chunk and the current one.
    • Added a getCharSpaceWidth() method to LocationTextExtractionStrategy to get the width of a space character.
    • Added a getText() method to LocationTextExtractionStrategy to get the text of the current Chunk.
    • Added an appendTextChunk(() method to SimpleTextExtractionStrategy to expose the append process so that subclasses can add text from outside the text parse operation.
  • Changes made by Alexander Chingarev
    • Refactoring for more convenient PDF/A-2,3 verifications (ongoing, we target for the next release)
      • Changes in the PdfIsoConformance interface.
      • Added PDF/A-2 transparency check.
      • Added Jpeg2000 to the PDF/A conformance checks.
      • Added optional content groups to the PDF/A conformance checks.
      • Added the possibility to tag artifact objects.
      • Fixed an XMP metadata bug that cause problems with PDF/A compliance in some cases.
    • Made FontFactoryImp threadsafe by making a block of code synchronized as suggested by Jonas Neukomm.
    • Now any IAccessibleElement can be artifact if user chooses "Artifact" as its role.
  • Changes made by Michaël Demey
    • Images that weren't supposed to be scaled, were scaled anyway because of a change in the defaults about a year ago (refactored by Raf).
    • moved BaseFont.getResourceStream() to StreamUtil.getResourceStream().
    • removed insureOpen() (a method with a typo in the name) and isOpen() from RandomAccessFileOrArray.
    • Fixed some error messages (Localization).
    • Applied some code formatting and fixed Javadoc info on numerous places.
    • Added some getInstance() methods to the Image class that allow adding an unrepairable broken TIFF to a document without throwing an exception. iText will do a best effort to store the TIFF into the PDF document. The result won't be correct, but iText won't throw an exception if the boolean value handleIncorrectImage is set to true.
    • Added scaleToFit() and scaleAbsolute() convenience methods to scale an Image based on a Rectangle's dimensions.
  • Changes made by Pavel Alay
    • Implemented signing XFA forms and XDP packages using XmlDSig (iText only; will not be in iTextSharp until next release).
  • Changes made by Eugene Markovskyi
    • When annotations are added, it should be possible to inherit the graphics state (more specifically the CTM), otherwise links can be added in the wrong places in certain circumstances.
    • Better handling of the graphics state in PdfContentByte
    • Added an inverseTransform() method to the AffineTransform class.
    • Made the methods openMCBlock() and closeMCBlock() public instead of protected.
    • Added null-check to CompareTool to avoid NullPointerException.
    • Fixed the append() method in the Chunk class.
  • Changes made by Raf Hens
    • Translated some JPEG2000 and OCG error messages.
    • Fixed self-reference in PdfCopy.
    • The scaleToFitLineWhenOverflow variable in the Image class was also used to scale to available height (this was undocumented, and it caused several scaling problems; see fixes by Michaël and Bruno). We've now introduced a scaleToFitHeight variable. This defaults to true for backward compatibility, whereas scaleToFitLineWhenOverflow defaults to false again, which was the default for its original purpose.
  • Changes made by Bruno
    • Images that weren't supposed to be scaled, were scaled anyway because of a change in the defaults about a year ago (refactored by Michaël).
    • Fix InlineImageUtils to deal with unexpected color space values. Suggestion by Lucek, see Stack Overflow.
    • Fixed a bug reported by Lauri Lehtinen: BDC / EMC operators risk getting unbalanced because the balance counter is decremented too early.
    • Added an isTagged() method to PdfReader.
    • Added classes that allow you to count the number of documents and bytes processed by the different writer and reader classes in iText.
    • Implementation of NOTE 1 in section 7.6.3.3 of ISO-32000: "The first element of the ID array generally remains the same for a given document."
    • Fixed generation number problem for PDF objects in a file with incremental updates. In previous versions, we never looked at the generation number, we always used 0 as generation number, even in append mode. This causes a problem, for instance when filling out forms that have widget annotations with a generation number greater than 0.

XML Worker 5.4.2

  • Changes made by Eugene Markovskyi
    • Fixed rendering of tables with fixed-width columns.

iText RUPS 5.4.2

  • Changes made by Bruno Lowagie
    • Fix: isXML() never returned true, because PRStream.toString() doesn't return the content of the stream.
    • Fix: in some cases, pages were missing in the page tree. This was caused by the order in which the objects are processed; /Pages entries always need to be parsed first.