Hi Hafeez,
-> One more issue we are facing.
-> We are trying to rotate a word document from landscape to portrait but we are unable to achieve it.
Problem:-
-> In a word file not all the pages are landscape.
-> We need to check if the particular page is a landscape then we need to rotate it to portrait.
-> We are using the below piece of code but it is not working as expected.
Question:- How to achieve the above problem using Aspose.Word 18.5 dll?
Code:-
Document doc = new Document(@"d:\Landscape Issues\PDFToDOC_out.doc");
// Loop through all section.
foreach (Section section in doc.Sections)
{
// section.PageSetup.PageHeight
//MessageBox.Show(section.PageSetup.Orientation.ToString());
if (section.PageSetup.Orientation.ToString().ToLower() == "landscape")
{
//section.PageSetup.TextOrientation = TextOrientation.Upward;
section.PageSetup.VerticalAlignment = PageVerticalAlignment.Justify;
section.PageSetup.Orientation = Aspose.Words.Orientation.Portrait;
}
// Change page orientation.
// section.PageSetup.Orientation = Aspose.Words.Orientation.Landscape;
}
// Save output document.
doc.Save(@"d: \Landscape Issues\out.doc");
Note:-
-> We are using Aspose.Word 18.5 dll for .Net.
-> In this situation we can not able to upgrade our dll.
Could you please help us ASAP. We are in a critical situation.
Thanks & Regards,
Santosh Kumar Panigrahi