You can have the order by reading the /Annots array from the page and matching 
Item.widget_refs. I'll think about something more user-friendly for the next release.

Best Regards,
Paulo Soares 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of B�hringer Jochen
> Sent: Friday, March 26, 2004 1:42 PM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] Order of the AcroFields
> 
> Hi,
> 
> I analyize an existing PDF Form using the iText API, to get 
> information about the form fields.
> 
> [...]
> PdfReader reader = new PdfReader(pdfForm);
> try
> {
>       PdfStamper stamper = new PdfStamper(reader, new 
> ByteArrayOutputStream());
> 
>       AcroFields acroFields = stamper.getAcroFields();
> 
>       Map fieldMap = acroFields.getFields();
> 
>       Set keys = fieldMap.keySet();
>       for (Iterator it = keys.iterator(); it.hasNext();)
>       {
>               String fieldName = (String) it.next();
>               AcroFields.Item field = (AcroFields.Item) 
> fieldMap.get(fieldName);
>       [...]
> 
> But I also need the order of the form fields on the pdf 
> document (the order used to navigate from field to field 
> using the tab key).
> 
> The Map I get with stamper.getAcroFields().getFields() is in 
> no certain order.
> Is there any method I can use to obtain the order of the fields?
> 
> Regards,
> 
> Jochen Boehringer
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=ick
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to