Hello Team,
I am using PDFSharpCore 1.3.9 library. I have PDF form with form fields as textbox and checkbox. I am updating values for these fields using library. Once I update values and open PDF in Adobe reader, I am able to see textboxes updated with values and checkboxes checked accordingly but if I open same PDF in any browser then I am only able to see textbox values and checkbox is not showing up as checked.
I created copy of same PDF file. Opened it in Adobe, and clicked on Save. After doing this, I am able to see both textbox values and checkbox as checked in any browser.
Looking into that more, I realized there is one element that is missing for PdfCheckBoxField that is '/AP' but I am using below code to add appearance.
if (acroForm.Elements.ContainsKey("/NeedAppearances")) { acroForm.Elements["/NeedAppearances"] = new PdfBoolean(true); } else { acroForm.Elements.Add("/NeedAppearances", new PdfBoolean(true)); }
Am I missing something here?
Thank you for your help!
|