I have signed PDF document. I have to get its signature bytes - not to verify 
the signature. How can I do that - I' ve tried the following :
try{
            PdfReader reader = new PdfReader(signedDocBytes);
            AcroFields af = reader.getAcroFields();
            ArrayList names = af.getSignatureNames();
            for (Object name1 : names) {
                String name = (String) name1;
                PdfPKCS7 pk = af.verifySignature(name);
                byte[] ssig = pk.getEncodedPKCS7();
                System.out.println("TEST : " + ssig);
            }
        } catch (IOException e) {
            Auxilary.logException(e);
        }

but an exception have been thrown : SignatureException: object not initialized 
for signing. 

Thanks in advance :)
Dimitar Nikolov



      

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to