Gonçalo, actually the code before already has written a preliminary PDF file to the file system: at the end of PdfSignatureAppearance.preClose(exclusions) everything but the actual inclusion of the signature bytes is already in that file.
You might consider storing this intermediary file (just investigate the PdfSignatureAppearance class a bit to know how to get a hold of it) somewhere. As soon as you have the signature bytes, simply fill in the /Contens of the PDF signature dictionary you just created. You can do that in a fashion similar to the implementation of the PdfSignatureAppearance.close() method. If there may be multiple signatures in those PDF documents you may consider either storing the signature name or the contents of PdfSignatureAppearance.exclusionLocations for later use. Regards, Michael. ------------------------------------------------------------------ From: Gonçalo Almeida [mailto:[email protected]] Sent: Tuesday, March 03, 2009 9:04 AM To: Post all your questions about iText here Subject: Re: [iText-questions] signing pdf with external signature Hi Actualy, that last line of yours has a dependency on what was done before the signing: "pdfSigApp.close(updates);" Isn't there a way of saving a temporary PDF right before the signing process and then just read it again and fill with the signature bytes? 2009/2/17 amarianoelaide <[email protected]> Your solution is what I was looking for. Great, thank you very much. -- View this message in context: http://www.nabble.com/signing-pdf-with-external-signature-tp21917425p22053892.html -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01 ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
