Free Support Forum - aspose.com

Mixing page layouts

Hi,

I am combining group of documents to the one document.

One of the documents has landscape layout.

Is it possible in Aspose.Words to have one document with pages in different layouts?

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you,

RK

Hello

Thank you for additional information. Yes you can achieve this, in case of using sections. I mean if each “document” inside your document will be separate section, you will be able to set page orientation for current section.

Please see the following link to learn more about sections in MS Word:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/sections-in-microsoft-word.html

Best regards,

Thank you Andrey,

This is my code for adding image(spreadsheet) as separate file to the main document.

Document docTestImage = new Document(appPath + @"/CB_Templates/TestImage.doc");<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

builder = new DocumentBuilder(docTestImage);

string imagePath = appPath + @"/Images/Aspose/Test.jpeg"; //spreadsheet

builder.InsertImage(imagePath);

//docTestImage.Sections[0].PageSetup.Orientation = Aspose.Words.Orientation.Landscape;

//docTestImage.UpdatePageLayout();

AppendDocument(docFrontPage, docTestImage);

But before adding I would like to rotate this image by -90.

Or I have to do this on stage when image was created?

Is it possible?

Thank you,

RK

Hi Rudolf,

Thanks for your inquiry. You can use the Rotation property of the Shape class to achieve what you are looking for.

If you have any further queries, please feel free to ask.

Thanks,,