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 > I need help - I can help
  New Posts New Posts RSS Feed - FlattenFormField emptying Field contents
  FAQ FAQ  Forum Search   Register Register  Login Login

FlattenFormField emptying Field contents

 Post Reply Post Reply
Author
Message
AndyD View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Apr 13
Location: UK
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyD Quote  Post ReplyReply Direct Link To This Post Topic: FlattenFormField emptying Field contents
    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)  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
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
AndyD View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Apr 13
Location: UK
Status: Offline
Points: 54
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndyD Quote  Post ReplyReply Direct Link To This Post 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?
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