PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
PdfSharp - How to fill Acroforms with c#? https://forum.pdfsharp.net/viewtopic.php?f=2&t=4281 |
Page 1 of 1 |
Author: | abe [ Mon Aug 09, 2021 9:24 am ] |
Post subject: | PdfSharp - How to fill Acroforms with c#? |
Hi, Is there an example on how to set different types of AcroForms field for: - TextBox Code: PdfDocument pdfDocument = PdfReader.Open("Demo.pdf"); pdfDocument.AcroForm.Fields["txtname"].Value = new PdfString("Hello World"); - CheckBox How to fill checkbox ???????????? - RadioButton How to fill radiobutton ???????????? |
Author: | jarrod212 [ Mon Aug 16, 2021 6:17 am ] |
Post subject: | Re: PdfSharp - How to fill Acroforms with c#? |
I am having the same problem. The only way I can set the fields is using string[] names = form.Fields.Names; for (int i = 0; i < names.Length; i++) { if (PDFfields.ContainsKey(fqName)) { form.Fields[i].Value = new PdfSharp.Pdf.PdfString(PDFfields[fqName]); } I can't set field with the check box and set it using Checked it will not work |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |