Friday, 30 September 2016

How to set Green Tick and Question marks in Signed PDF using iTextSharp C#?

I was signing PDF using iTextSharp, every thing was fine but Yellow Question Mark and Green Tick was not showing near signature area. I tried to find option on net some were it was clarified that it was for and till Adobe Acrobat 6 only, now the day ISO doesn't understand. But had to achieve because it was mandatory for us to create same as client's requirement.

Output:




By adding this snippet


PdfSignatureAppearance SignatureAProperties = pdfStamper.SignatureAppearance;
SignatureAProperties.Reason = "Personal";
SignatureAProperties.Location = "Delhi";
   
//for green tick and question marks
SignatureAProperties.Acro6Layers = false;
SignatureAProperties.Layer4Text = PdfSignatureAppearance.questionMark;


Output: