We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to set Aspose PDF JAVA Page Orientation to LANDSCAPE


Could you please let me know how to set a particular page orientation to LANDSCAPE in ASPOSE PDF JAVA?

I tried to set PageInfo().setLandscape(true) but it does’t take effect as the contents still render in PORTRAIT mode.

Do we need to page rotate to 90 degrees or something to see the LANDSCAPE orientation of PDF document.??


You can update page size by calling SetPageSize() method of the Page class. The PageInfo class is only to generate the PDF. Please refer to this help topic: Update Page Dimensions. However, if this does not help, then kindly send us the complete details of the use case, including source PDF and code. We will investigate and share our findings with you.