How to insert a single page in Landscape orientation

Hi,

I’m generating a Word document and I want to add couple of pages with the landscape orientation.
But If I do that as below, the page numbering is reset from that page. Document shows it has 53 pages whether it has more than 500. Am I doing that wrong?

builder.insertBreak(BreakType.SECTION_BREAK_NEW_PAGE);
builder.getPageSetup().setOrientation(Orientation.LANDSCAPE);

Thanks in advance for any help,
Mariusz

Hi Mariusz,

Thanks for your inquiry. Please make sure that you are not using Aspose.Words in evaluation mode and have applied the license before creating Document instance. Please also make sure that you;re using latest version of Aspose.Words 14.9.0:
https://releases.aspose.com/words/java

In case the problem still remains, please attach your input Word document and expected Word document showing the desired behavior here for testing. We will investigate the issue on our end and provide you more information.

Best regards,