title: Error in CTPageSZ class using Apache POI Java NetBeans Word Document
body: <p>I try to produce a Microsoft Word document by using Apache POI and Java. I was really happy with the result until I try to change the orientation of the document to landscape. I did search and find some solutions. One of them is: <a href="https://stackoverflow.com/questions/28833418/switch-page-to-landscape-from-portrait-apache-poi">https://stackoverflow.com/questions/28833418/switch-page-to-landscape-from-portrait-apache-poi</a>.</p>
  
  <p>When I try to enter the codes below. I have encountered some problems. I use Netbeans IDE.</p>
  
  <pre><code>XWPFDocument document = new XWPFDocument();
  CTDocument1 doc = document.getDocument();
  CTBody body = doc.getBody();
  CTSectPr section = body.addNewSectPr();
  XWPFParagraph paragraph = document.createParagraph();
  CTP ctp = paragraph.getCTP();
  CTPPr br = ctp.addNewPPr();
  br.setSectPr(section);
  CTPageSz pageSize = section.getPgSz();
  pageSize.setOrient(STPageOrientation.LANDSCAPE);
  </code></pre>
  
  <p>Line 9 and 10 gives me error regarding "CTPageSz".</p>
  
  <p>I encounter the following error messages from NetBeans:</p>
  
  <ol>
  <li>Create class "CTPageSz" in package apachetable1</li>
  <li>Create class "CTPageSz" in apachetable1.ApacheTable1</li>
  <li>Configure "Throwable method result is ignored" Hint</li>
  </ol>
  
  <p>I search about CTPageSz but could not really know how to fix this error. I use Apache POI 3.13. </p>
  
  <p>Are there any simpler ways to change orientation to landscape ? Thank you.</p>