alivepdf

Determine current position when writing long text using AlivePDF


I need to create a layout with an image on the left and text to the right of it. While the image width is known, the text length is not.

I want to be able to write the text and be able to determine where on the Y axis I need to addImage for the next image.

Thank you.


Solution

  • The PDF class exposes this public method: pdf.getY()