pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Move rotated text to center of page
Date Tue, 24 Jan 2017 22:02:34 GMT
Am 24.01.2017 um 22:53 schrieb Gilad Denneboom:
> I can't figure out
> how the moveTextPositionByAmount works...

It is relative to the previous position since the start of the text 
mode. It starts at 0,0.

> Basically what I would like is to be able to calculate the height and width
> of the text, so I could figure out where on the page to place it so that
> the center of both objects are aligned.

See the DrawPrintTextLocations example on how to calculate the height. 
It's quite tricky. The width you can get by PDFont.getStringWidth().

To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org

View raw message