Print Page | Close Window

Save value to field form

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=1447
Printed Date: 04 Apr 26 at 8:03PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Save value to field form
Posted By: mariovermeulen
Subject: Save value to field form
Date Posted: 13 May 10 at 10:08AM
Hi
 
I am trying to load a pdf and then save a form fields value, i am setting the form fields name case sensitive but still no luck i can send the sample pdf i am using to anyone willing to help
 
regards
 
Mario
 
here is the code
      // Load PDF
      QP.LoadFromFile('D:\3D Office\Invoices\test.pdf');
      // Read field value and display
      ShowMessage(QP.GetFormFieldValueByTitle('InvoiceNumber'));
      // Set form Field InvoiceNumber
      QP.SetFormFieldValueByTitle('InvoiceNumber','1223324');
      // Save PDF to test output PDF file
      QP.SaveToFile(AnsiString('D:\3D Office\Invoices\testoutput.pdf'));



Replies:
Posted By: Ingo
Date Posted: 13 May 10 at 3:53PM
Hi Mario!

Before calling the Save you need the following...

QP.SetNeedAppearances(1);
QP.SetFormFieldValueByTitle( FieldName, FieldValue );
nresult := QP.FindFormFieldByTitle(FieldName);
QP.UpdateAppearanceStream(nresult);

with this syntax the value was set,
you can see the value with any pdf-reader and
you can change the value again.

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