You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Amir H. Jadidinejad" <am...@yahoo.com.INVALID> on 2014/08/05 17:13:14 UTC

How to convert TextPosition of a character into appropriate values of QuadPoints and PDRectangle?

I have the position of a stream of characters in the input pdf file. Each character has a TextPosition object.

Suppose that, I want to highlight this stream of characters. As I know, I have to leverage PDAnnotationTextMarkup. This class requires the position of the annotation which is set by "setRectangle()" and "setQuadPoints()" functions.


I don't know how to convert a TextPosition object into PDRectangle and QuadPoints equivalence.