title: PageSize of PDF always the same between landscape and portrait with itextpdf
body: <p>I have a PDFReader which contains some page in landscape mode and other in portrait.</p>
  
  <p>I need to distinct them to do some treatment... However, if I call the getOrientation or getPageSize, the value is always the same (595 for pagesize and 0 for orientation).</p>
  
  <p>Why isn't the value different for a page in landscape ?</p>
  
  <p>I've tryied to find other methods to retrieve page width / orientation but nothing worked.</p>
  
  <p>Here is my code : </p>
  
  <pre><code>for(int i = 0; i &lt; pdfreader.getNumberOfPages(); i++)
  {
      document = PdfStamper.getOverContent(i).getPdfDocument();
  
      document.getPageSize().getWidth; //this will always be the same
  }
  </code></pre>
  
  <p>Thanks !</p>