I would like to produce a PDF that has pages in landscape. While it is possible to set the size of the page to landscape using:
document.setPageSize(PageSize.LETTER.rotate());
this does not achieve what I want because any content that I add is still oriented left->right while I would like it to be bottom->top.
I.E. this is what I am getting:
When what I want is:
I have been able to achieve the desired output by opening the PDF after it has been created and rotating it using iText, but I would like a solution that lets me rotate it immediately with iText after adding content to it.
See Question&Answers more detail:os