The Situation: In PDFBox, PDRectangle objects\' default origin (0,0) seems to be the lower-left corner of a page.
For example, the following code gives
The following seems to be the best way to "adjust" the TextPosition coordinates:
x_adjusted = x_original + page.findCropBox().getLowerLeftX(); y_adjusted = -y_original + page.findCropBox().getUpperRightY();
where page is the PDPage on which the TextPosition object is located
page
PDPage
TextPosition