Feb 24

We generally use the excellent iText library for generating pdf files using Java.

When we need to display text vertically it is simply a matter of rotating the cell containing the text by 90 degrees as shown in the following example.

PdfPCell cell = new PdfPCell(new Phrase("Some text I want to be vertical"));

The same technique can be used to render text at any angle.

written by objects \\ tags: , , , ,

Array ( ) 2 Responses to “Vertical text in pdf using iText”

  1. vani Says:

    So simple…
    Thanks :]

  2. Mario Says:

    It does not work, for me the method setRotation is undefined for object PdfPCell.
    I try to use cell.rotate() but it doesn’t not work.

Leave a Reply

You must be logged in to post a comment.