title: iText - Rotate page content while creating PDF
body: <p>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:</p>
  
  <pre><code>document.setPageSize(PageSize.LETTER.rotate());
  </code></pre>
  
  <p>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.</p>
  
  <p>I.E. this is what I am getting:</p>
  
  <p><img src="https://i.stack.imgur.com/NHrob.png" alt="landscape with content left-&gt;right"></p>
  
  <p>When what I want is:</p>
  
  <p><img src="https://i.stack.imgur.com/2dRvm.png" alt="landscape with content bottom-&gt;top"></p>
  
  <p>I have been able to achieve the desired output by <a href="http://itextpdf.com/examples/iia.php?id=232">opening the PDF after it has been created and rotating it</a> using iText, but I would like a solution that lets me rotate it immediately with iText after adding content to it.</p>