To get the rectangle (extents) for a specific AcroField this seems to work:

AcroFields                              = pdfStamper.getAcroFields();

AcroFields.Item item    = (AcroFields.Item)pdfFields.getFields().get( fieldID 
);

ArrayList               widgets         = item.widgets;
PdfDictionary   dict                    = (PdfDictionary)widgets.get( 0 );
ArrayList               rect                    = ((PdfArray)dict.get( PdfName.RECT 
)).getArrayList();
                
float                   upperLeftX              = ((PdfNumber)rect.get( 0 
)).floatValue();
float                   upperLeftY      = ((PdfNumber)rect.get( 1 )).floatValue();
float                   lowerRightX     = ((PdfNumber)rect.get( 2 )).floatValue();
float                   lowerRightY     = ((PdfNumber)rect.get( 3 )).floatValue();

where pdfStamper is the stamper you are using.

Thanks anyway....looks like I'm off to the races!

Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to