Print Page | Close Window

FlattenFormField emptying Field contents

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=2852
Printed Date: 05 Feb 25 at 5:01PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: FlattenFormField emptying Field contents
Posted By: AndyD
Subject: FlattenFormField emptying Field contents
Date Posted: 25 Mar 14 at 1:11PM
After successfully populating form fields with rich text ( http://www.quickpdf.org/forum/populate-rich-text-form-field-with-formatted-text_topic2834.html" rel="nofollow - http://www.quickpdf.org/forum/populate-rich-text-form-field-with-formatted-text_topic2834.html )  I now have another problem.
 
Because I want to create static documents, after the pdf has been created I need to flatten all the fields. The problem arises here in that if the field contains rich text, the FlattenFormField function seems to blank the contents.
I have found a workaround by setting the fields to readonly but the drawback to this is that a locked field is quite dramatically bigger in size than a flattened one. As my final PDF contains many pages this makes a significant difference.
 
Does anyone know of another way to achieve this or how to get the Flatten function to handle rich text content?
 
Many thanks



Replies:
Posted By: AndrewC
Date Posted: 28 Mar 14 at 11:10AM
Andy,

If the appearance stream for the field is correct then the the field should flatten just like any other field.  The problem you are having is that Debenu Quick PDF Library cannot create the appearance streams for the Rich Text.  

When you open a file in Acrobat it checks all form fields to see if they have an appearance stream and then it creates a new one if one is not found.

I assume you want to fill the form fields and then flatten in one step without loading the file in Acrobat ?

Andrew.


Posted By: AndyD
Date Posted: 28 Mar 14 at 11:24AM
Yes as covered in my previous post and in my sample code provided in the forum, we have achieved populating pdf form fields with rich text from a VB6 app (which we were advised wasn't possible). Now I need to flatten those fields so they cannot be edited when the pdf is loaded.
 
Is there any workaround to achieving the correct appearance stream?



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