Hello!

 

   With the aim of get a signed pdf document, I do the following:

 

PdfReader reader = new PdfReader(pdfToSign);

            FileOutputStream fout = new FileOutputStream(pdfToSignSigned);

 

            PdfStamper stp = PdfStamper.createSignature(reader, fout, '\0');

            PdfSignatureAppearance sap = stp.getSignatureAppearance();

            sap.setCrypto(key, chain, null,
PdfSignatureAppearance.WINCER_SIGNED);

            

            sap.setSignDate(Calendar.getInstance());

            sap.setReason("I am the author");

            sap.setLocation("Anywhere");

 

            System.out.println("Signature Name = " + sap.getFieldName());
//Get the signature name

 

            //Comment the next line if we want an invisible signature

            sap.setVisibleSignature(new Rectangle(100, 100, 200, 200), 1,
null);

 

            stp.close();

 

 

With this process, I obtain an “adbe.pkcs7.sha1” signature (included in the
SubFilter field in the signature dictionary of the signed pdf). However, I
would like to get an “adbe.pkcs7.detached” signature.

 

 Could you be so kind as to tell how can I get it instead of an
“adbe.pkcs7.sha1” signature, please??

 

Thank you very much in advance.

 

Inma.

 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to