Free Support Forum - aspose.com

Aspose.words java - set page size not working?

Document document = new Document(“text.docx”);
document.getFirstSection().getPageSetup().setPageWidth(ConvertUtil.inchToPoint(100));
document.getFirstSection().getPageSetup().setPageWidth(ConvertUtil.inchToPoint(100));
document.save(“result.docx”);


the size of result.docx is not changed?

Thanks

Hi,


Thanks for your inquiry. Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v13.3.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.3.0 and let us know how it goes on your side. I hope, this will help.

If the problem still remains, please attach your input Word document here for testing. I will investigate the issue on my side and provide you more information.