Absolute text position in PDFBox

Viewed 897

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

1 Answers

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.

Related