You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by genaro Camele <ge...@hotmail.com> on 2017/02/03 19:49:00 UTC

Image location

Hi! First of all sorry about my English.

I would like to know if there's a way to get images location starting from upper-left corner of the page. Because I'm trying with the example from the SVN (link at the end of this mail) and it seems to be starting from low-left corner. For instance, an image in the top of the page outputs:


[cid:8e292150-74b4-4b4e-95f4-e38d42f9518d]


When I would need to get


position in PDF = 15.0, 0.0 in user space units


Thanks in advance!

https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java?view=log


Re: Image location

Posted by Tilman Hausherr <TH...@t-online.de>.
Hi,

The reason is that PDF y coordinates start at the bottom of the page, 
and not at the top as in java.

Tilman

Am 03.02.2017 um 20:49 schrieb genaro Camele:
>
> Hi! First of all sorry about my English.
>
> I would like to know if there's a way to get images location starting 
> from upper-left corner of the page. Because I'm trying with the 
> example from the SVN (link at the end of this mail) and it seems to be 
> starting from low-left corner. For instance, an image in the top of 
> the page outputs:
>
>
>
>
> When I would need to get
>
>
> *position in PDF = 15.0, 0.0 in user space units*
>
>
> Thanks in advance!
>
> https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/util/PrintImageLocations.java?view=log
>
>