Skip to content
Advertisement

iText paragraph.setRotationAngle changes text orientation

I’m trying to add some vertical texts to a PDF file, but when I rotate my paragraphs with setRotationAngle every space turn into a line break or the text orientation is changed, I’m not sure. The pictures show the result I expect and the result I’m getting. I’m using iText 7.1.0 at NetBeans 12.3.

Result I want

Result I get

Here’s my full code

JavaScript

Advertisement

Answer

Try Below code it will work as expected showTextAligned is a Convenience method to write a text aligned about the specified point

JavaScript

Full code

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement