Monday, July 08, 2013

Digital Signature Example Using Java PdfSignatureAppearance

We are going to digitally sign the document using
For the below example you will need itext-1.3.1.jar

                PdfStamper pefstamp= PdfStamper.createSignature(....

                PdfSignatureAppearance pdfSign = stp.getSignatureAppearance();
                pdfSign .setCrypto(key, chain, null, PdfSignatureAppearance.SELF_SIGNED);
                pdfSign .setReason("Testing");
                pdfSign .setLocation("Chennai");
                com.lowagie.text.Font font = new com.lowagie.text.Font();
                pdfSign .setLayer2Font(font);
                pdfSign .setVisibleSignature(new com.lowagie.text.Rectangle(30, 830, 190, 750), 1, "Footer");

No comments: