We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Word Doc in some pages Portrait and some Landscape

I have a document , whose some pages are in portrait and some pages are in landscape , how can i convert this type of document in pdf.

@muhammad.asad2020

You can convert any type of Word document to PDF using following code example.

var doc = new Document(MyDir + "input.docx");
doc.Save(MyDir + "output.pdf", SaveFormat.Pdf);

We suggest you please read the following article.
Saving a Document

I am already saving them successfully and it is working fine , but in a special case when in a document some pages are portrait and some pages are landscape i am unable to convert the document . as a result either all pages are portrait or landscape , but i want a result in which portrait remain portrait and landscape remain landscape

@muhammad.asad2020

Please call Document.UpdatePageLayout method before saving the document. Hope this helps you.

If you still face problem, please ZIP and attach your input Word document here for testing. We will investigate the issue on our side and provide you more information.