Guest User

Untitled

a guest
Oct 24th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public static void test()
  2. {
  3. using (PdfDocument pdfDoc = new PdfDocument(new PdfWriter(@"c:temppippo.pdf")))
  4. {
  5. //Add some blank pages
  6. pdfDoc.AddNewPage();
  7. pdfDoc.AddNewPage();
  8. pdfDoc.AddNewPage();
  9.  
  10. //Instantiate a Signature Form Field using factory
  11. PdfSignatureFormField sgnField =
  12. PdfFormField.CreateSignature(pdfDoc, new Rectangle(100, 100, 200, 100));
  13.  
  14. //setting name and page
  15. sgnField.SetFieldName("pluto");
  16. sgnField.SetPage(1);
  17.  
  18. //Adding to AcroForm
  19. PdfAcroForm.GetAcroForm(pdfDoc, true).AddField(sgnField);
  20. }
  21. }
Add Comment
Please, Sign In to add comment