title: Page orientation in Aspose
body: <p>I am using <code>aspose-words-15.6.0</code> api for java. I want to change the page orientation to <code>portrait or landscape</code> based on the page number.</p>
  
  <p><strong>Scenario:</strong></p>
  
  <p>I've a <code>doc</code> having 3 pages in it, I want page orientation as follow: </p>
  
  <ul>
  <li>1st Page : Portrait.</li>
  <li>2nd Page : Landscape.</li>
  <li>3rd Page : Portrait.</li>
  </ul>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I have tried with <code>DocumentBuilder</code>, there is a way to achieve this but I am missing something, please refer the screenshot I've attached with this question.</p>
  
  <p><a href="https://i.stack.imgur.com/pz9lI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pz9lI.png" alt="enter image description here"></a></p>
  
  <p>Any help would be greatly appreciated.</p>