Release iText 5.1.3
Today we've published a new release of iText and XML Worker. These new releases are right in time to be presented at Devoxx, the biggest Java conference in Europe. Don't forget to drop by for a chat at the iText booth\
Release Notes:
iText Core 5.1.3
iText 5.1.3 brings the long awaited support for PAdES-LTV. Examples on how to use this functionality that will be part of the upcoming PDF-2 standard will be following soon. We've also improved the code for parsing PDFs for images. It can now be done using much less code than before. We've added support for JavaScript when parsing bookmarks to XML (or vice-versa) and some convenience methods to ColumnText
.
Furthermore, we've fixed plenty of bugs that were reported since the previous release, for instance a bug that garbled the output when parsing PDFs with fonts using a /ToUnicodeMap
, an issue with page numbers that were shown even when the page label should have been empty, and so on.
Finally, we've made iText more tolerant towards PDFs that weren't created correctly. For instance a PDF with a binary zero in the Producer name, or PDFs where the /Outlines
dictionary isn't an indirect reference.
XML Worker 1.1.1
XML Worker 1.1.1 has been slightly refactored internally. The CssApplier
interface has been suppressed in favor of a CssAppliers
class. We've also fixed some bugs that were reported on the mailing list.
Next week, we'll be demonstrating some of iText's and XML Worker's functionalities in five 5 minute powerdemo's at the iText booth.
Changelog:
iText 5.1.3 Core
- 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.
- Support for PAdES
- 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 withXMLUtil.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 aClassCastException
. 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)
thenorientationVector.length()
is0
and orientationVector.normalize() isNaN
. Because of thisdistPerpendicular
equals the minimumint
value anddistParallelStart
isNaN
. 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 theDocumentFont
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 thegetWidth()
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 theAttribute
subclass of theHTML
class. - Better check for CSS link.
- Reuse the
TagProcessorFactory
insideXMLWorkerHelper
. - Changed the accidental rename in
StackKeeper
ofgetTag()
togetName()
back togetTag()
, as it returns aTag
. - Added
FLOAT
,RIGHT
andBOTTOM
to theCSS
class for future use. - Removed the
CssApplier
interface. It's no longer used: XYZCssApplier
no longer implementsCssApplier
. Some had different method signatures anyway. XYZCssApplier
s are now used through theCssAppliers
class which will detect which applier to use. This change makes the css applier classes easier to be used elsewhere by decoupling it from theHtmlPipelineContext
.
- Added a subclass
- 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 theparseWithReader
method of theXMLParser
class.
- Bugfix: the wrong
- Changes made by Alexander Chingarev
- Bugfix XMLParser: the
InputStream
wasn't being reset after detecting the encoding in thedetectEncoding()
method.
- Bugfix XMLParser: the