Release iText 5.3.2
I've just released iText 5.3.2 and XML Worker 1.1.6. We've fixed some minor bugs in XML Worker, but the main reason for this release is iText's digital signature functionality.
Release Notes:
iText 5.3.2 Core
The day after tomorrow, we'll be releasing the draft of the first 90 pages of our white paper about digital signatures. During the writing process, we decided it would be a good idea to improve some interfaces, for instance 'Why use true
/false
for CAdES/CMS? Why not use an enum
?' or 'Why do we force people to use the same provider
for hashing and signing?' and 'why don't we use Bouncy Castle as default for making digests?'
Those are questions users don't always dare asking out-loud, but we were confronted with these questions ourselves whilst documenting the functionality. So we did a great effort straightening everything out, providing a much more programmer-friendly interface. In the next versions, you can expect us to do the same effort regarding the verification of digital signatures, so keep following us.
Changelog:
iText 5.3.2 Core
Changes made by Paulo Soares
Tiff colormaps are 16 bit but some tiff producers just put 8 bit resulting in black images. For these broken tiffs we try again using only 8 bits.
- Digital Signatures
- Introduced the
ExternalDigest
interface, so that you can separate the hashing from the signing (done withExternalSignature
). This means that it's possible to have different providers for signing and hashing. - Created two implementations of
ExternalDigest
:ProviderDigest
andBouncyCastleDigest
UseBouncyCastleDigest
by default for digests (in general) and get its digest algorithms straight from Bouncy Castle. - Fix: the signature fields in a form should come in the order of the revision.
- Introduced the
- Changes made by Eugene Markovskyi
- Fix: When a div is in a table, XML Worker 1.1.5 (using iText 5.3.1) fails. 1.1.4 with 5.3.0 does produce output.
- Changes made by Alexander Chingarev
- Refactored
PdfWriter.addSharedObjectsToBody()
andPdfStamperImp.close()
for reasons of convenience.
- Refactored
- Changes made by Raf Hens
- Hyphenation wasn't friendly towards unknown characters.
- Fixed a
NullPointerException
inPdfAWriter
- Tiff images with "new-style" Jpeg compression (compression 7) can have separately defined quantization and Huffman tables. These need to be added to the Jpeg data in order to create a valid Jpeg image.
- Changes made by Michaƫl Demey
- Added color functionality to
ZapfDingbatsList
by introducing a setter and a new constructor.
- Added color functionality to
- Changes made by Bruno
- Removing unnecessary imports
- Fix in
PdfAnnotationsImp
: You can't always assume that thePdfArray
returned byget(PdfName.RECT)
is of typePdfRectangle
. It could just be aPdfArray
object. - Creating page events for
PdfCopy
orPdfSmartCopy
doesn't make sense, so let's throw an exception when somebody tries to do so. - Digital Signatures
- Avoiding a
NullPointerException
for graphical signature appearances that didn't get a graphical element. - Introduced a
PdfSigLockDictionary
to lock specific fields; add a FieldMDP to the signature to lock those fields. - Changed the order of the parameters in the
signDetached()
method of theMakeSignature
class, because hashing is done before signing (and the API has changed anyway). - Added reusable methods to
DigestAlgorithms
that create aMessageDigest
instance or create the digest. Replaced instances ofMessageDigest.getInstance()
in the security package with the new convenience method fromDigestAlgorithms
. - When using SunMSCAPI, also create the hash using the default
MessageDigest
of the JDK. - When using the default
MessageDigest
, normalize the name of the digest algorithm. For instance change SHA256 to SHA-256. - Introduced an
enum
to pass the Signature Standard to thesignDetached()
method of theMakeSignature
class. - Added extra logging to the signing process: finding CRLs, using CRLs, Time stamping.
- Renamed
CrlClientImp
toCrlClientOnline
and added constructors that take an URL or a certificate chain (from which URLs will be extracted). - Do a better effort to find the CRL when using the default
CrlClientOnline
- Changed the default digest algorithm in
TSAClientBouncyCastle
from SHA-1 to SHA-256 - Introduced a
TSAInfoBouncyCastle
interface that allows you to get more info right after receiving the timestamp from the TSA.
- Avoiding a
XML Worker 1.1.6
- Changes made by Eugene Markovskyi
- Fix: if
inCssFile
is null, the default CSS should be used. - Fix: When a div is in a table, XML Worker 1.1.5 (using iText 5.3.1) fails. 1.1.4 with 5.3.0 does produce output.
- Fix: the inner tables were acquiring the width of the first column of outer table rows if the contained row spans across multiple columns.
- Fix: if