Print Page | Close Window

Unable to set values in AcroFormFields

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=3264
Printed Date: 29 Apr 24 at 6:20PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Unable to set values in AcroFormFields
Posted By: Ludwig
Subject: Unable to set values in AcroFormFields
Date Posted: 13 Feb 16 at 7:15AM
Hi,

I am using Debenu QuickPdf to set values to Acro Form Fields.
The function I use is:
    FlatAPI1115.DPLSetFormFieldValueA(instanceId, index, inputValue)


This is working as expected. However for certain PDFs its resulting in a crash.

These PDFs apparently are malformed in some way. This is because whenever I open them in "Adobe Acrobat Reader" It always asks me if I would Like to "Save the Modifications", even though I have just viewed it.  If I click Yes and attempt to write  using the library,It succeeds. However If I click No the "Fatal Exceptions" continue to occur. 

Debenu in one of its blog posts writes, "Sometime ago, Adobe made the decision to automatically repair these malformed PDF files in Adobe Reader and Adobe Acrobat when they encountered them in the wild. Usually, users don't even know that a PDF has been repaired. It happens silently in the background as the PDF is opened. Often, the only clue that the PDF has been repaired is that the Save button is enabled."

FYI: When Adobe Acrobat Reader is asked to "SAVE" the document, the Size of The Document is reduced.

My Problem is : That I am unable to detect whether a given PDF will result in a crash or not. I assume that the problematic pdfs must be malformed. Is there any way in which I can detect these "PROBLEMATIC" Pdfs. Interestingly I am able to do ther things like converting these Pdfs into images using QuickPdfs. Only when I use functions like SetFormFieldValue, or UpdateAppearanceStream does the application crash.

please download a sample Pdf from the link:
http://drive.google.com/file/d/0B_6Z82hoBteTMzAwY2U3ZE13QkU/view?usp=sharing" rel="nofollow - https://drive.google.com/file/d/0B_6Z82hoBteTMzAwY2U3ZE13QkU/view?usp=sharing

Thanks,
Ludwig











Replies:
Posted By: Ingo
Date Posted: 13 Feb 16 at 10:14PM
Hi Ludwig,

you should check it out if the malformed documents are the one made with Adobe's InDesign.
The pdf forms not initially made with InDesign will work.
I've previewed your document with my own solution and i tried it with Foxit. There wasn't any problem.
Only Adobe-products telling you something about problems ;-)
Adobe products check if the document was modified by a third party tool and throw these messages.
Adobe wants to sell there own products.

I've written about this in the past:
http://pdfcomments.blogspot.de/2009/06/pdf-and-forms.html

You can check this before if you read out the content of "creator".
If there's "...InDesign..." then you've found a problemfile.



-------------
Cheers,
Ingo




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