I don't know where you heard that "positioning is relative to whitespace" - 
that is simply NOT TRUE.

All coordinates in the PDF are relative to the origin of the MediaBox of the 
page.  PERIOD.

That said - if the page has no CropBox then everything is perfect and no 
problems.

HOWEVER, when the page HAS a CropBox (which impacts the VISUAL DISPLAY but not 
the coordinates) then you need to be sure to adjust your coordinates relative 
to the new coordinate system.

Leonard

-----Original Message-----
From: Lloyd [mailto:lloydgold2...@gmail.com] 
Sent: Wednesday, October 07, 2009 2:48 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] Acro form positioning + margins


Hello,

I'm writing an application that grabs the field positions in a PDF. I
noticed that the positioning of these (LEFT, BOTTOM) are relative to the
white spacing in a PDF. Now, from what I've read on the mailing list, there
is no such things as margins. I've noticed that when loading the PDF up in a
program like Photoshop, the spacing disappears, while if I load the PDF up
in Adobe Reader, or I capture an image of it in GhostScript the spacing is
there.

My question is, is there anyway to get the spacing details? Is the "content"
inside some kind of rectangle box so I can figure out the spacing?

The reason I want this is I'm converting the field positions to pixels, and
placing them over an image of the PDF. This image will contain the white
spacing and I need these numbers to position the fields correctly.

The only option I've come up with is to get the width of the PDF with the
spacing, then use a program like GhostScript to generate the PDF with no
margin at all, and then compare the width/height to get the spacing. I'm
hoping there is an easier way.

If anyone has any suggestions it would be greatly appreciated. Thanks in
advanced.
-- 
View this message in context: 
http://www.nabble.com/Acro-form-positioning-%2B-margins-tp25795037p25795037.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to