Print Page | Close Window

Save as Dialog after newly built PDF

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2105
Printed Date: 22 Nov 24 at 7:48PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Save as Dialog after newly built PDF
Posted By: zero_g
Subject: Save as Dialog after newly built PDF
Date Posted: 19 Jan 12 at 7:07PM
Hello,
I am using the Quick PDF Library during the Trial Period. I filled a given Form (used as a Template) with the SetFormFieldValueByTitle Property. That works so far. A new flattened PDF-Form will be created. When I opened the new PDF File with lets say Acrobat Reader and close it immediatly I was asked "Would you like to save changes Yes/No/Cancel".
What changes could that be? This dialog makes me a bit nervous.
 
Greetings Tom



Replies:
Posted By: AndrewC
Date Posted: 19 Jan 12 at 9:35PM
If you are flattening formfields then it is most likely there are some fields still present and the NeedAppearances flag is still turned on so Acrobat is attempting to update the appearance streams.

The following line after your LoadFromFile call should fix the problem.

  QP.SetNeedAppearances(0);

To remove all the formfields you could do the following

  for (int i= QP.FormFieldCount(); i>=1 ; i++)      // for I = QP.FormFieldCount downto 1
    QP.DeleteFormField(i);



Posted By: Ingo
Date Posted: 21 Jan 12 at 10:07AM
Hi Tom!

Flattened or not ... there are still fragments from a form type pdf
inside the content and acrobat is searching for it and gives you
the warning message.

Cheers and welcome here,
Ingo



Posted By: zero_g
Date Posted: 23 Jan 12 at 4:31PM
Hallo AndrewC,
thank you for your help. I inserted the DeleteFormField() Command and now it works very well. It seems that the SetNeedAppearances() is (in my case) not necessary.
 
Thanks to all.
 
Tom



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk