PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Mar 19, 2024 5:21 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Mar 30, 2022 11:52 pm 
Offline

Joined: Wed Mar 30, 2022 11:38 pm
Posts: 2
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!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 67 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group