Dear Paulo,

Thanks for your new version 127.  It is great!

I am using AcroFields and I can get the positon area.
but, I have problem to get the name, current value,  
page number  for each field. 

Would you please give me help on my following code?
Your help is greatly apprrecaited.

yun

////////////////////////////////////////////
PdfReader reader = new PdfReader("GovFormSig.pdf");
AcroFields form = reader.getAcroFields();
HashMap fieldsMap       = form.getFields ();
Collection col  = fieldsMap.values();
Object[] objArr         = col.toArray();

for (int i = 0; i< objArr.length; i++) 
{
   AcroFields.Item field  =
(AcroFields.Item)objArr[i];
   ArrayList liste = field.widgets;
   System.out.println("Field " + i );
  
   //Get the name of the field
                                                 
   // Current Value
                                         
   //Get the page number of the field
                                        
   //Get the position box
   for (int j = 0; j < liste.size(); j++) 
   {
     PdfDictionary merged=
     (PdfDictionary)liste.get  (j);
     
     PdfArray rect = (PdfArray)PdfReader.
       getPdfObject(merged.get(PdfName.RECT));

     Rectangle box =
PdfReader.getNormalizedRectangle(rect);
                                                 System.out.println(" x1: " + 
box.left() + " y1:
" + box.bottom() + " w " + box.width() + " h " +
box.height() );

 }
}





-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to