Hi,
I have an HTML file (attached: Landscape.html) which has some MSWord specific CSS added to it to make Word interpret it as a landscape document.
When I open this HTML file in Aspose and save it as a Word document, the landscape option seems to be correctly interpreted and de document looks fine.
I was however not aware of this CSS setting and I applied the following code to force my document into landscape mode (this is a piece of testing code):
##################################################################
Document baseDoc = new Document(“Landscape.html”);
baseDoc.Save(“Vanilla.docx”);
foreach (Aspose.Words.Section section in baseDoc.Sections)
{
section.PageSetup.Orientation = Aspose.Words.Orientation.Landscape;
}
baseDoc.Save(“Vanilla_Landscapeified.docx”);
Document landscapeified = new Document(“Vanilla_Landscapeified.docx”);
foreach (Aspose.Words.Section section in landscapeified.Sections)
{
section.PageSetup.Orientation = Aspose.Words.Orientation.Landscape;
}
baseDoc.Save(“Landscapeified_Landscapeified.docx”);
##################################################################
When opening the “Vanilla_Landscapeified.docx” document, all pages appear to be positioned in portrait instead of landscape?
I am thinking that Aspose correctly interpretes the MSWord specific CSS line “mso-page-orientation:landscape;” but forgets to mark the sections as being oriented in landscape mode?
Opening the landscapeified document and re-applying the Landscape oriëntation does not have an effect on the final “Landscapeified_Landscapeified.docx” document so I think Aspose made a wrong initial assumption of the document dimensions/orientation.
I need to be able to force any document that I receive into landscape or portrait mode, independant on the source file I get (word or HTML), for printing.
This seems to me like a small malfunctioning inside Aspose or is this actually intended behaviour?