Print Page | Close Window

Form field data not visible

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=1685
Printed Date: 22 Nov 24 at 6:40PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Form field data not visible
Posted By: petefeyerherd
Subject: Form field data not visible
Date Posted: 15 Dec 10 at 11:23PM
Using QuickPDFAX0722
 
After reviewing several posts that recommended using SetNeedAppearances and UpdateAppearanceStream, still no visible form field data.
 
Used FlattenFormField, then the form field data was visible on the form
 
    lngFieldCount = objPDFform.FormFieldCount()
    For intField = 1 To lngFieldCount
        tmpFieldName = objPDFform.GetFormFieldTitle(intField)
      If txtFieldTitle = tmpFieldName Then
'        lngReturn = objPDFform.SetNeedAppearances(1)
        lngReturn = objPDFform.SetFormFieldValue(intField, txtFieldValue)
'        lngReturn = objPDFform.UpdateAppearanceStream(intField)
        lngReturn = objPDFform.FlattenFormField(intField)
        Exit For
      End If
    Next intField
 
Should you have to use FlattenFormField to update the fields



Replies:
Posted By: Ingo
Date Posted: 16 Dec 10 at 7:08AM
Hi Pete!

Perhaps it's only unvisible?
-> SetFormFieldVisible

Cheers, Ingo



Posted By: Dimitry
Date Posted: 15 Jan 11 at 11:07PM
Hi Pete,
 
Can you link us the problem PDF file? 


-------------
Regards,
Dmitry


Posted By: petefeyerherd
Date Posted: 19 Jan 11 at 9:54PM
The form is at
 
http://www.cookcountyassessor.com/forms/HoCofE.pdf - http://www.cookcountyassessor.com/forms/HoCofE.pdf
 
Thanks


Posted By: Dimitry
Date Posted: 20 Jan 11 at 1:22PM
There are three kinds of PDF form documents: AcroForm, XFA and AcroForm/XFA.
This PDF is AcroForm/XFA. 
It contains both AcroForms and XFA fileds, that means that they should be managed accordingly.
 
First we need to check the type of PDF forms: 
  if (FormFieldCount() <> 0) and (GetXFAFormFieldCount() <> 0) then
we have AcroForm/XFA;
  else if FormFieldCount() <> 0 then
we have AcroForm;
  else if GetXFAFormFieldCount() <> 0 then
we have XFA.
 
And after this we need to use AcroForm and XFA functions to change both field types.
Please check this http://www.quickpdflibrary.com/help/quickpdf/FormFields.php - Form fields function group  to see what XFA management functions are provided by Quick PDF Library.
 
 


-------------
Regards,
Dmitry


Posted By: petefeyerherd
Date Posted: 22 Jan 11 at 8:10PM
So are you saying that I need to use both
 
SetXFAFormFieldValue and SetFormFieldValue to update the field or is there a function that indicates the field type?
 
Thanks.


Posted By: Ingo
Date Posted: 22 Jan 11 at 8:58PM
Hi!

If GetXFAFormFieldCount() returns with a value > 0 you should use SetFXAFormFieldValue...
If FormFieldCount() returns with a value > 0 you should use SetFormFieldValue...

Cheers, Ingo



Posted By: Dimitry
Date Posted: 23 Jan 11 at 7:50PM

And if both FormFieldCount() <> 0 and GetXFAFormFieldCount() <> 0 you should change values of both fields accordingly...

Please see this http://help.quickpdflibrary.com/questions/105/can-quick-pdf-library-print-pdf-forms-that-use-xfa-form-fields - KB article about XFA form fields for more information.
 


-------------
Regards,
Dmitry


Posted By: edir
Date Posted: 26 Jan 11 at 9:42AM
Hi,
I've got the same problem, i must complile a few fields then prin document, but the document printed have no field....

can you help me please??

GetXFAFormFieldCount() --> 1
FormFieldCount() --> 5

but GetXFAFormFieldName(1)  -->  ""

I'm using a trial version to valutate if it's possible to buy for my work

thank's in advance
Edy Rossi

PS: excuse me for my bad english Embarrassed


Posted By: Dimitry
Date Posted: 26 Jan 11 at 12:11PM
Hi Edy,
 
The problem PDF sample would be great, as usually.
 


-------------
Regards,
Dmitry


Posted By: quickpdf_learner
Date Posted: 11 May 11 at 7:11PM
I have the exact problem, while I am using purchased 7.24 version. Please advise how to print out the forms with filled in fields.
Thanks.
 
Originally posted by edir edir wrote:

Hi,
I've got the same problem, i must complile a few fields then prin document, but the document printed have no field....

can you help me please??

GetXFAFormFieldCount() --> 1
FormFieldCount() --> 5

but GetXFAFormFieldName(1)  -->  ""

I'm using a trial version to valutate if it's possible to buy for my work

thank's in advance
Edy Rossi

PS: excuse me for my bad english Embarrassed


Posted By: Ingo
Date Posted: 11 May 11 at 8:50PM
Hi!

Please read in the online-reference the parts regarding:
SetNeedAppearances,
UpdateAppearanceStream and
FlattenFormField...
http://www.quickpdflibrary.com/help/quickpdf/FormFields.php

And try the formfield-part in the demo-app.
http://www.quickpdflibrary.com/blog/2009/10/a-customizable-demo-for-quick-pdf-library/

Cheers, Ingo



Posted By: edir
Date Posted: 12 May 11 at 10:09AM

wow fantastic... Tongue

this is the way in VB6 (suppose that field name of PDF is "Text1"):

.......
Dim idxField as long
Const FlagON = 1
......
'general setting
PDFLibrary.SetNeedAppearances FlagON
PDFLibrary.UpdateAppearanceStream FlagON         
'field index retreve
idxField = PDFLibrary.FindFormFieldByTitle("Text1")           
'field setting
PDFLibrary.SetFormFieldPrintable idxField , FlagON
PDFLibrary.SetFormFieldValue idxField , "My new string in field"
PDFLibrary.SetFormFieldReadOnly idxField , FlagON
.....
 
thank you very much Ingo
 
bye bye
Edy


Posted By: quickpdf_learner
Date Posted: 12 May 11 at 9:36PM
After UpdateAppearanceStream and SetNeedAppearances were used, some textfields (not all) can be printed out. Very strange,  for example, I have a form with accountholdername and address textfields, only address textfields data are printed out, while accountholdername textfield data is not.
If FlattenFormField is used, the form can not be generated!
 
Originally posted by Ingo Ingo wrote:

Hi!

Please read in the online-reference the parts regarding:
SetNeedAppearances,
UpdateAppearanceStream and
FlattenFormField...
http://www.quickpdflibrary.com/help/quickpdf/FormFields.php

And try the formfield-part in the demo-app.
http://www.quickpdflibrary.com/blog/2009/10/a-customizable-demo-for-quick-pdf-library/

Cheers, Ingo



Posted By: Ingo
Date Posted: 12 May 11 at 10:02PM
Hi!

It will be anywhere in the mixed formfield bunch with XFA and normal fields together.
You should upload your pdf anywhere and post the url ... then we can check if anybody wants.

Cheers, Ingo


Posted By: edir
Date Posted: 13 May 11 at 7:42AM
I confirm, field is compiled and stored on PDF but when i use print command field is not present on paper, but if i open pdf with acrobar reader there is all field compiled



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