PageSetup.Orientation question

Hi Aspose team,

I have an question regarding following scenario:
When I’m mapping page properties applied to div element in attached html file doc builder test.zip (13.2 KB), specifically:

size:841.9pt 595.3pt;
mso-page-orientation:landscape;

I’m ending up with a document that looks like it’s in portrait orientation (also attached in zip). When the word is opened and one will open Layout > Page Setup and click OK without making any changes, the reopen same tab the orientation is changed from Landscape to Portrait.

I’d expect that setting orientation will also take into account the Height and Width of the page and will update them accordingly (switch the page dimensions). Could you please take a look and let me know your opinion on this case?

Thanks,
Mateusz

@acturisaspose,

Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for .NET 18.8 with following code example and have not found the shared issue. So, please use latest version of Aspose.Words for .NET 18.8. We have attached the output DOCX with this post for your kind reference. 18.8.zip (6.1 KB)

Aspose.Words.LoadOptions options = new Aspose.Words.LoadOptions();
options.LoadFormat = LoadFormat.Html;
Document doc = new Document(MyDir + "PageTest.html", options);
doc.Save(MyDir + @"18.8.docx");

Hi Tahir,

many thanks for a quick response. I’ve tried your code and it works fine in my examples - so the issue is in our own implementation rather then in Aspose library.

Thanks,
Mateusz

@acturisaspose

Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.