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!
Order of field name retrieval |
Post Reply |
Author | |
jabaltie
Senior Member Joined: 08 Nov 05 Location: Brazil Status: Offline Points: 138 |
Post Options
Thanks(0)
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 ! |
|
jabaltie
Senior Member Joined: 08 Nov 05 Location: Brazil Status: Offline Points: 138 |
Post Options
Thanks(0)
|
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 ? |
|
bogey
Senior Member Joined: 30 Nov 05 Location: United States Status: Offline Points: 50 |
Post Options
Thanks(0)
|
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 |
|
jabaltie
Senior Member Joined: 08 Nov 05 Location: Brazil Status: Offline Points: 138 |
Post Options
Thanks(0)
|
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 ! |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store