PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 7:53 pm

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 Nov 21, 2018 3:34 pm 
Offline

Joined: Wed Nov 21, 2018 10:47 am
Posts: 1
Hello,

i'm using PdfSharp(Version 1.50.4845-RC2a) to fill-in acroforms with Values i get from somewhere else. In order to make these changes, i used a tipp from this forum in which you add
and/or set "/NeedAppearances" in the acroForms to true, like this:

Code:
if (acroForms.Elements.ContainsKey("/NeedAppearances"))
    acroForms.Elements["/NeedAppearances"] = new PdfBoolean(true);
else
    acroForms.Elements.Add("/NeedAppearances", new PdfBoolean(true));


in order to make the values visible that i've inserted.

This works perfectly and the inserted values are visible. However, when opening a pdf that was changed like that (even if i didn't actually inserted any values into the form fields and just set the "/NeedAppearances" flag) with Adobe Acrobat, i get a "Save changes" dialog when closing Acrobat. It seems like Acrobat assumes that the pdf is broken, and tries to repair it, indicated by the fact that the "/NeedAppearances" flag is nowhere to be seen after saving the changes that Acrobat made to the document and that the file size reduces by about 30%.

When opening the pdf in a different PdfReader like SumatraPdf, i don't get asked the "save changes" question, suggesting that this is an Acrobat thing.
I'm using Acrobat Reader DC version 19.008.20074.43139.

My goal is to prevent the "Save changes" dialog, e.g. stop Acrobat from making these changes when opening the pdf.

Is there someone with a similar problem? Is there a different way to make the values visible besides "NeedAppearances"?

I'm grateful for any suggetions.


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 157 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