Absolute text position in PDFBox

Eduardo Londoño :

I'm trying to create a pdf document in java using the PDFBox libraries and for now, I am positioning the text using newLineAtOffset(x, y); but I would prefer to position using an absolute position, rather than the relative.

Is there any way to use an absolute position or a have to stay with the relative one?

Thank you in advance for any help you can give me

Tilman Hausherr :

You are starting at (0,0) after calling contents.beginText();. Thus if you want to work with absolute positions only, then put only one (absolute) positioning in a contents.beginText();contents.endText(); segment.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=101796&siteId=1