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 > General Discussion
  New Posts New Posts RSS Feed - Order of field name retrieval
  FAQ FAQ  Forum Search   Register Register  Login Login

Order of field name retrieval

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

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Topic: Order of field name retrieval
    Posted: 07 Mar 06 at 7:07AM
I use Open Office version 2.0 to design my PDF with empty form fields (a template PDF).

Then, I have an utility of mine that "reads" the PDF and lists the form fields that this PDF contains.The purpose of this utility is to generate a source code to be pasted into my original code. Something like PDFformfieldname="".

Then I do :

FOR index=1 TO formfieldcount
formfieldname=getformfieldtitle(index)
NEXT

Finally : the problem is that the FOR/NEXT above sometimes wont retrieve the field names on the order they appear at the PDF.

Is there a way to make this field name retrieval to be done on a TAB ORDER manner ? Or, at least to retrieve some other information from the fields, such as their positioning, so that I could classify the field names ?

Because my generated source code gets messed up, that is, the fields are listed not on the order that they appear on the page...

Thanks in advance for your support !
Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 07 Mar 06 at 7:22AM
Another idea that I've just had : from this utility of mine, I can load the whole PDF into a string and then, try to find out some more information from it, even if QuickPDF does not return it to me.

I just need to know what I have to look for, that is, where in the PDF I can find either the tab order or the field positioning.

Here's like a field declaration looks like, when I open the PDF as a text file :

6 0 obj
<< /Type /Annot
   /Subtype /Widget
   /F 4
   /Rect [58.6 643.8 124.9 656.7]
   /FT /Tx
   /P 1 0 R
   /T (TCOPROCESSO)
   /TU <FEFF>
   /V <FEFF>
   /DV <FEFF>
   /DR << /Font 45 0 R >>
   /DA (0 0 0 rg /HelvReg 8 Tf)
   /AP <<
     /N 51 0 R
   >>
>>
endobj

Where's the field positioning (or the tab order) on the field declaration above ?
Back to Top
bogey View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Nov 05
Location: United States
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote bogey Quote  Post ReplyReply Direct Link To This Post Posted: 07 Mar 06 at 7:30AM

Use the loop to retrieve the list of all the form fields and retrieve the tab order at the same time. Place both pieces of information in an 2 dimensional array.

dim formfieldArray(formFieldCount,2)

FOR index=1 TO formfieldcount 

  formfieldArray(index,0) = QP.getFormFieldTabOrder(index)

  formfieldArray(index,1) = QP.getformfieldtitle(index)

NEXT

Then sort the array by the array column 0 using whatever sort algorythmn you want.



Edited by bogey
Back to Top
jabaltie View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 Nov 05
Location: Brazil
Status: Offline
Points: 138
Post Options Post Options   Thanks (0) Thanks(0)   Quote jabaltie Quote  Post ReplyReply Direct Link To This Post Posted: 07 Mar 06 at 7:51AM
Ops, of course !

I didnt remeber there was a GetFormfieldTabOrder function !

Once I have it in hand, sorting it is a piece of cake !

Issue closed.

Thanks !
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