Landscape docx being converted to portrait pdf

Evaluating Aspose Total for Java

With a landscape docx; the pdf being generated is Portrait
And with a Portrait docx the pdf being generated is Portrait too…
How can I change the below lines of code so that the docx orientation is retained while doing the pdf conversion?

com.aspose.words.Document asposeDoc = new com.aspose.words.Document(docxpath.toString());
asposeDoc.save(intermediatePdf.toString());
Hi Sreemoyee,

Thanks for your inquiry. Could you please attach your input Word document and output PDF file showing the undesired behavior here for testing? We will investigate the issue on our end and provide you more information.

Best regards,