PDFsharp & MigraDoc Foundation http://forum.pdfsharp.com/ |
|
Add a signature field to a specific position on the page http://forum.pdfsharp.com/viewtopic.php?f=2&t=3388 |
Page 1 of 1 |
Author: | 1andy1 [ Tue Jul 05, 2016 5:02 pm ] |
Post subject: | Add a signature field to a specific position on the page |
Hello, I have been searching for an example how to add a signature field to a specific position on the page with no success. Can you provide a little example? Thanks, Andrej. |
Author: | malaneha [ Fri Oct 13, 2023 10:24 pm ] |
Post subject: | Re: Add a signature field to a specific position on the page |
Here's an ex.. Code: using PdfSharp.Drawing; using PdfSharp.Pdf; using PdfSharp.Pdf.AcroForms; class SignatureFieldExample { static void Main() { const string filename = "Output.pdf"; // Create a new PDF document PdfDocument document = new PdfDocument(); // Add a page to the document PdfPage page = document.AddPage(); XGraphics gfx = XGraphics.FromPdfPage(page); // Add a signature field to a specific position PdfAcroForm acroForm = document.AcroForm; PdfSignatureField signatureField = new PdfSignatureField(page, "SignatureField") { Left = XUnit.FromCentimeter(5), Top = XUnit.FromCentimeter(10), Width = XUnit.FromCentimeter(6), Height = XUnit.FromCentimeter(2) }; acroForm.Fields.Add(signatureField); // Save the document document.Save(filename); } } I hope it helps.. |
Author: | govertDW [ Tue Oct 31, 2023 3:37 pm ] |
Post subject: | Re: Add a signature field to a specific position on the page |
Hi Malaneha, Which version of PdfShar^p are you using? regards, govert |
Author: | malaneha [ Sat Dec 16, 2023 7:49 am ] |
Post subject: | Re: Add a signature field to a specific position on the page |
govertDW wrote: Hi Malaneha, Which version of PdfShar^p are you using? regards, govert I'm using PdfSharp version 1.50. Could you confirm the version of PdfSharp you're using to add signature fields? |
Author: | aamirmunir [ Mon Jan 01, 2024 5:56 pm ] |
Post subject: | Re: Add a signature field to a specific position on the page |
govertDW wrote: Hi Malaneha, Which version of PdfShar^p are you using? regards, govert this code not working with PDFSharp 6.0 |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |