Release iText 5.4.2
New Java PDF library release of version 5.4.2. The C# and the Android port will follow soon. So will XFA Worker. These are some of the important topics taken from the changelog.
For the next release, we're working on better PDF/A support; that PDF/A-1 Levels A and B, PDF/A-2 Levels A, B and U, as well as PDF/A-3 Levels A, B and U. When you look at the changelog for iText 5.4.2, you can see that some of the work is already done; we hope we can finalize a first beta version for the next release.
Release Notes
Introduction
For 2013, we defined four goals, with the main focus on improving the products developed last year based on customer feedback, as well as starting a new R&D track oriented towards structured / unstructured documents.
In practice, this resulted in four new goals:
Support for PAdES-5, more specifically signing XFA or XDP documents. This combines the R&D we've done with respect to signing with the R&D on XFA.
Making it easier for developers to produce Tagged PDF to allow the creation of PDF/A Level A and PDF/UA on the fly. This way, we hope to increase the world's percentage of structured PDF documents. (According to well-informed sources, iText is in the top 5 when looking at the producer line of all PDFs produced world-wide.)
Applying the results of our R&D regarding the creation of Tagged PDF to XFA Worker. This should allow customers using XFA Worker to start generating PDF/A Level A documents and maybe (if the source data is rich enough) even PDF/UA compliant PDFs.
Improving the parsing process to examine unstructured documents.
iText Core 5.4.2
iText 5.4.2 shows that we're on track to reach those goals. We've made the Java library release of version 5.4.2 today. The C# and the Android port will follow next week. So will XFA Worker. These are some of the important topics taken from the changelog.
Bugfixes
iText had its 13th birthday last February, which means our technology is mature. Nevertheless, we've found and fixed some really old bugs, as well as some bugs that were introduced recently.
A mighty old bug concerns generation numbers of objects when working in append mode. A recent bug caused images to be scaled incorrectly. These are things of the past now.
PAdES-5
We've implemented PAdES-5 to sign XFA forms and XML Data Packages (XDP) using XML-DSig. We'd really appreciate people willing to test this functionality.
Parsing PDF
We've added some convenience methods to make it easier to interpret and enhance the results of iText's parsing process. We've improved the parsing process for Chinese, Japanese and Korean.
We've also released a new version of iText RUPS that fixes some annoying bugs we experienced when looking inside existing PDF files.
XFA Worker 5.4.2
Tagged PDF
We've selected a couple of test users who'll get a sneak preview explaining how to create PDF/A Level A using XFA Worker, which is a closed source add-on, written on top of iText and XML Worker.
We're talking about XFA Worker creating documents that are Tagged, respecting the structure of the original XML data as closely as possible. This should be a major breakthrough for customers wanting to create PDFs that need to be compliant with archiving and accessibility standards in an automated way.
Changelog
iText Core 5.4.2
- Changes made by Paulo Soares
- Improved
ArabicLigaturizer
by replacing a binary search with aHashMap
. - Added support text extraction for CJK fonts with Identity-H encoding and a known ordering.
- Improved
- Changes made by Kevin Day
- Added a method to create a
RandomAccessSource
from an existing file channel toRandomAccessSourceFactory
- Added an
isChunkAtWordBoundary()
method toLocationTextExtractionStrategy
to check if a space character should be inserted between a previous chunk and the current one. - Added a
getCharSpaceWidth()
method toLocationTextExtractionStrategy
to get the width of a space character. - Added a
getText()
method toLocationTextExtractionStrategy
to get the text of the currentChunk
. - Added an
appendTextChunk(()
method toSimpleTextExtractionStrategy
to expose the append process so that subclasses can add text from outside the text parse operation.
- Added a method to create a
- 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.
- Changes in the
- Made
FontFactoryImp
threadsafe by making a block of codesynchronized
as suggested by Jonas Neukomm. - Now any
IAccessibleElement
can be artifact if user chooses"Artifact"
as its role.
- Refactoring for more convenient PDF/A-2,3 verifications (ongoing, we target for the next release)
- 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()
toStreamUtil.getResourceStream()
. - removed
insureOpen()
(a method with a typo in the name) andisOpen()
fromRandomAccessFileOrArray
. - Fixed some error messages (Localization).
- Applied some code formatting and fixed Javadoc info on numerous places.
- Added some
getInstance()
methods to theImage
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 theboolean
valuehandleIncorrectImage
is set totrue
. - Added
scaleToFit()
andscaleAbsolute()
convenience methods to scale anImage
based on aRectangle
'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 theAffineTransform
class. - Made the methods
openMCBlock()
andcloseMCBlock()
public instead of protected. - Added
null
-check toCompareTool
to avoidNullPointerException
. - Fixed the
append()
method in theChunk
class.
- Changes made by Raf Hens
- Translated some JPEG2000 and OCG error messages.
- Fixed self-reference in
PdfCopy
. - The
scaleToFitLineWhenOverflow
variable in theImage
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 ascaleToFitHeight
variable. This defaults totrue
for backward compatibility, whereasscaleToFitLineWhenOverflow
defaults tofalse
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 toPdfReader
. - 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, becausePRStream.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.
- Fix: