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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > General Discussion
  New Posts New Posts RSS Feed - Filling out PDFs with FormFields then saving them
  FAQ FAQ  Forum Search   Register Register  Login Login

Filling out PDFs with FormFields then saving them

 Post Reply Post Reply
Author
Message
BobW View Drop Down
Senior Member
Senior Member


Joined: 27 Feb 13
Location: Minnesota
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobW Quote  Post ReplyReply Direct Link To This Post Topic: Filling out PDFs with FormFields then saving them
    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
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 21 Mar 15 at 5:48PM
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

Back to Top
BobW View Drop Down
Senior Member
Senior Member


Joined: 27 Feb 13
Location: Minnesota
Status: Offline
Points: 64
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobW Quote  Post ReplyReply Direct Link To This Post Posted: 02 Sep 15 at 5:34PM
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store