Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void test()
- {
- using (PdfDocument pdfDoc = new PdfDocument(new PdfWriter(@"c:temppippo.pdf")))
- {
- //Add some blank pages
- pdfDoc.AddNewPage();
- pdfDoc.AddNewPage();
- pdfDoc.AddNewPage();
- //Instantiate a Signature Form Field using factory
- PdfSignatureFormField sgnField =
- PdfFormField.CreateSignature(pdfDoc, new Rectangle(100, 100, 200, 100));
- //setting name and page
- sgnField.SetFieldName("pluto");
- sgnField.SetPage(1);
- //Adding to AcroForm
- PdfAcroForm.GetAcroForm(pdfDoc, true).AddField(sgnField);
- }
- }
Add Comment
Please, Sign In to add comment