Hi!
Im a JAVA developer and using JAVA 1.5 and iText 1.55 for PDF document signing [Creation of Digital Signatures].
I want to make some customised signatures in PDF doc using iText
1.55. Currently im creating signatures like in attached diagram "Signature-Old.gif". But I want to make signature like in attached diagram "Signature-Final.gif". Here is the sample JAVA code. Im tried it lots of time code is running OK.
//Loading Signature Image from file
Image obj_pic = Image.getInstance("1.gif");
//Getting Signature Appearance
m_objSigApp = m_objPDFStamp.getSignatureAppearance();
m_objSigApp.setCrypto(m_objPrk, m_objCertChain,null, PdfSignatureAppearance.WINCER_SIGNED);
//Setting Signature Location
m_objSigApp.setVisibleSignature(new Rectangle(100, 500, 400, 400), 1, "Signature1");
m_objSigApp.setAcro6Layers(true);
PdfTemplate n1 = m_objSigApp.getLayer(1);
PdfTemplate n2 = m_objSigApp.getLayer(2);
n2.getBoundingBox().setBorder(4);
n2.getBoundingBox().setBorderColor(CMYKColor.DARK_GRAY
);
n2.setLineDash(10);
n2.beginText();
BaseFont bf = BaseFont.createFont("Helvetica", BaseFont.WINANSI, false);
Font myFont = new Font(Font.HELVETICA, 200, Font.NORMAL);
bf = BaseFont.createFont
("Helvetica", BaseFont.WINANSI, false);
n2.setColorStroke(java.awt.Color.BLUE);
n2.setFontAndSize(bf, 12);
n2.showText("Hello");
//Setting Signing Reason
n2.showText("I'm Auhtor of this document");
//Setting Contact Detail
n2.showText("Lahore, Pakistan");
n2.endText();
obj_pic.setBorder(3);
obj_pic.setBorderColor(CMYKColor.BLUE);
obj_pic.setAbsolutePosition(10,10);
n2.addImage(obj_pic);
//Closing PdfStamper
m_objPDFStamp.close();
Code is running fine and it is also creating signature but not of my desire.
Please help me in this regard
Regards
KS