By Date: <-- -->
By Thread: <-- -->

order of acro fields when iText reads an acroform



The source is your friend.
 
IIRC, iText uses a hash map to store the fields, so the order they're in has nothing to do with the order in the document, the page, reading order, or anything else.  It's effectively random, though you'll get the same order every time for a given set of entries.
 
 
Yep.  On of the first members of AcroFields is the 'fields' HashMap, line 74 according to the online CVS browser:
http://itext.cvs.sourceforge.net/itext/src/com/lowagie/text/pdf/AcroFields.java?view=markup

--Mark Storer
  Senior Software Engineer
  Cardiff.com

#include <disclaimer>
typedef std::Disclaimer<Cardiff> DisCard;

-----Original Message-----
From: itext-questions-bounces (at) lists.sourceforge.net [mailto:itext-questions-bounces (at) lists.sourceforge.net]On Behalf Of Don Don
Sent: Thursday, February 01, 2007 4:55 AM
To: IText Forums
Subject: [iText-questions] order of acro fields when iText reads an acroform



Hi all,
I am reading an acroform document containing acrofields and am prepopulating it with data.  Since i don't know how the
acroform was created, ordered and organised (i.e. the naming of fields and order of the fields), i am iterating through the document
and printing the field names, i get the following as the output:

3
7
11a
18
14
1
6
button
10
5
16
13
15
9
11
4
8
12

the figures displayed above are the names of the acroform fields in the document i am reading.  
I want to know how iText reads acroforms, does it read and lists the fields
in the order of how its laid out (displayed) in the document or the order of how the developer created the acrofields ?

I need to populated this with data in a corresponding html form, i don't have issues with the population, i just need to be able to
map the html form fields to the corresponding acro form field.

Cheers


Get your own web address.
Have a HUGE year through Yahoo! Small Business.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/