Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
How to Flatten a Form? |
Post Reply |
Author | |
alecd4
Beginner Joined: 29 Sep 11 Status: Offline Points: 10 |
Post Options
Thanks(0)
Posted: 29 Sep 11 at 6:32PM |
I am using QuickPDF library 8.11.906 via C# wrapper. Trying to flatten a form that I previously filled in my application. Here is my [pseudo]code
LoadFromFile(path) while(FormFieldCount() > 0) { FlattenFormField(1); } SaveToFile() FlattenFormField above returns 0 to indicate a problem while LastErrorCode returns 0 as well. I was trying to add SetNeedAppearances(1) just after LoadFromFile with no change in behavior What I am doing wrong? UPDATE: Well, I figured out that the code above won't produce any result if first field will fail to flatten for whatever reason Here my new code LoadFromFile(path) total=FormFieldCount(); while( total> 0) { FlattenFormField(total--); } SaveToFile() Above code simply removes control's appearance: for edit field only value is shown but no box borders, radio buttons and checkboxes are gone. I called SetNeedAppearances(1) just after LoadFromFile but still no controls. Any ideas what is wrong? Edited by alecd4 - 29 Sep 11 at 8:27PM |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
FormField flattening works much better in reverse because you can flatten the children before flattening the parent objects. It doesn't work so well the other way around.
Can you send the PDF through to the official support site and I can see what could be going on. There are many different issues that could be causing this type of behaviour. Andrew.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store