Hello Pascal,

In the PDF coordinate system origin (0, 0) is defined in the lower left of the 
page.
The Java Geometrie coordinate system defines origin (0, 0) in the UPPER left. 
See JavaDoc of java.awt.geom.Rectangle2D.Float#Float(float, float, float, 
float).

I think that is where the confusion comes from. Try either to use a PDRectangle 
or check out the code, how a Rectangle2D is converted into a PDRectangle.

> Rectangle2D rect = new Rectangle2D.Float(315, 368, 224, 16);
> When I open the pdf with PDFBox debugger I see "Rect 315 472 540 457"


Further, check if you need to consider page rotation in your solution.
If you do, then you will have to recalculate your x, y depending on the page 
rotation (page.getRotation()).


Waldemar





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to