Print Page | Close Window

Viewing Filled Form Fields

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=1557
Printed Date: 14 Jan 26 at 2:35PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Viewing Filled Form Fields
Posted By: Luke
Subject: Viewing Filled Form Fields
Date Posted: 28 Aug 10 at 6:16PM
I am using Delphi and QuickPDF v 7.21 and I'm having problems viewing filled forms.  Basically I am doing the following:

APDF.LoadFromFile( 'Form.pdf' );
APDF.SetFormFieldValue( 1, 'Test' );
APDF.RenderPageToFile( 72, 1, 5, 'Filled.png' );
// Code to View 'Filled.png'

That only shows the form without any fields filled in. As a test, I added:
APDF.SaveToFile( 'Filled.pdf');
and compared 'Filled.png' with 'Filled.pdf'. 'Filled.pdf' has the fields correctly filled in while 'Filled.png' does not. So I am relatively confident that I am filling the form correctly. I also inspected the results of each command and everything indicates success.

I then modified my code as follows:
APDF.LoadFromFile( 'Form.pdf' );
APDF.SetFormFieldValue( 1, 'Test' );
APDF.FlattenFormField( 1 );
APDF.RenderPageToFile( 72, 1, 5, 'Filled.png' );
// Code to View 'Filled.png'

Flattening the Field first resolves the problem. Flattening the Field, however complicates my code since after viewing I may need to go back and Set the field to a different value.

Is there a way set the field value and render the page for my viewer without Flattening? TIA.





-------------
Luke M. Miller

ResCorSoft, Inc.



Replies:
Posted By: Ingo
Date Posted: 28 Aug 10 at 6:30PM
Hi Luke!

Instead of Flatten you should use SetNeedAppearances ...
Then it will work as you want it to.

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