views:

202

answers:

2

We work with a software that has an applet that digitally signs PDF documents. This applet uses Itext to do this.

However, IText jar is kinda large (1.5Mb), and many of our users don't have a good connection. Because of this, the applet download takes a really long time to be completed sometimes.

So my question is: which alternatives other than IText can I use to digitally sign a PDF filewithin an applet? All the applet has to do is to sign a PDF, so no other features for PDF file are really necessary.

Thanks in advance!

A: 

I believe that IText is using a third party open source library for encryption as part of the signing process of PDF documents. This library is called Bouncy Castle and consists in multiple jar files which total about 3Mb. These files also have to be downloaded in addition to the 1.5 Mb IText jar which makes the 1.5 Mb not too significant. It might be hard to find other smaller libraries that would do that with less than 1.5 Mb. We also have a library to sign PDF documents and it is about the same size as IText, it's called jPDFSecure and it is around 1.5 Mb also. Are you signing an existing field or adding a new signature? Maybe if you want to add only new digital signatures instead of signing existing digital signature, the code could be "thin out" but in any case, it would be hard to make it significantly smaller.

Qoppa PDF
Indeed, IText does use BouncyCastle. Even though it's not really necessary to add all its jar's to the applet (only bcprov-xxx.jar is enough), it still adds up another 1,5Mb that I forgot to check when I wrote my initial question...I got a little confused about your question: we need to sign an existing document, but to do that we must add a new signature to the document, don't we? I didn't understand what you meant about signing an existing field.About jPDFSecure, I downloaded it last week, but still didn't have much time to check it out. If it does the job, we may be considering it!
Charles
A: 

Have you asked on the Itext mailing list if you can leave bits out to reduce size?

mark stephens
Not really. Will do!
Charles