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!
Filling out PDFs with FormFields then saving them |
Post Reply |
Author | |
BobW
Senior Member Joined: 27 Feb 13 Location: Minnesota Status: Offline Points: 64 |
Post Options
Thanks(0)
Posted: 20 Mar 15 at 8:03PM |
I was working with some government documents that contain form fields. I wrote some code that filled out the fields and printed the documents. It worked just fine. If I want to save the same documents as filled-out PDFs that can't be re-filled out I get the following message from Adobe Reader:
"This document enabled extended features in Adobe Reader. The document has been changed since it was created and use of extended features is no longer available. Please contact the author for the original version of this document." I couldn't find a solution to this in the forum (maybe my searching abilities are poor). I solved this problem by filling out the form fields, using UpdateAndFlattenFormField on each field (in reverse order) then using RemoveUsageRights. That seems to work. Is it the preferred method? TIA Bob |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Bob,
if you have ANY solution against this built in "money-making" adobe behavior it's absolutely great! Thanks a lot for this post! If you don't have anything against it i'll copy your post with a new title into the general section? Cheers, Ingo |
|
Cheers,
Ingo |
|
BobW
Senior Member Joined: 27 Feb 13 Location: Minnesota Status: Offline Points: 64 |
Post Options
Thanks(0)
|
Slight update:
I had an issue with Adobe Reader 8 not being able to open a PDF but 9, 10, and 11 could. It happened when I filled out the form fields then added a watermark in a new content stream before flattening the fields and removing the usage rights. I first solved this by removing the usage rights before using UpdateAndFlattenFormField. After moving the watermark code to a point BEFORE I fill out the form fields, I found the order of RemoveUsageRights and UpdateAndFlattenFormFields didn't matter. Still, this is probably the best way to do it as it seems to work in all cases for all versions of Reader: CreateNewContentStream and add watermark For each Form Field you want to fill out SetFormFieldValue UpdateAppearanceStream next Form Field RemoveUsageRights ii=FormFieldCount do While ii > 0 UpdateAndFlattenFormField ii ii = ii-1 loop Edited by BobW - 02 Sep 15 at 5:58PM |
|
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