1T3XT BVBA <info <at> 1t3xt.info> writes: > > Op 17/12/2010 11:43, qplace schreef: > > Thank you for the reply. That is what I am using to determine field > > coordinates, call to getFieldPositions. For most of the pdf documents that I > > tested it works fine. > OK. > > There is one document, however, where this method > > returns 0 for the left coordinates. I am using following method to find the > > left coordinate of the field (itextsharp): > > AcroFields.FieldPosition.position.Left. > > > > When I open this particular document in Acrobat I noticed that the left border > > of the field sits exactly on the left margin of the page. > The coordinate of the lower-left corner of a document is usually[*] (0, 0). > So if the left border of the field sits exactly on the left margin of > the page, > then a result of 0 is correct, isn't it? If not, I don't understand the > question. > > [*] There are PDFs with a different value for the origin, check the MediaBox > and the CropBox to be sure.
Thank you for the quick reply. I checked Rectangle.Left value as it is returned from PdfReader.GetPageSize and PdfReader.GetCropBox. Indeed, the document in question produced negative "left" property in both rectangles, and the documents where I had no issues have zeroes. Judging by the value it is what I have to add to the value of "position.left" returned from the getFieldPosition. Do you know of any references regarding this issue in the documentation/IText book? I own the book, but can't find anything that talks about combining getFieldPosition and relative position of the page rectangles? ------------------------------------------------------------------------------ Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
