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

Free Support Forum - aspose.com

Incorrect conversion of odt file to doc

when I try to convert an odt document to doc which contains different page margins between the first and the following ones, the generated document gives the same margins for all the pages

@MMO2 Could you please attach your input and output document here for testing? We will check the issue and provide you more information.

screen.png (118.4 KB)
convert_aspose.zip (22.2 KB)

i attached the source document and the generated document with aspose. Thanks for your help

@MMO2 Thank you for additional information. In this case Aspose.Words mimics MS Word behavior, if you open your document in MS Word the output will look exactly the same as Aspose.Words output.
However, I see OpenOffice inserts a section break to emulate different margins in DOC file. You can achieve the similar behavior using Aspose.Words, however it will be required to set margins in the code. To achieve this you can use Document.ExtractPages method:

Document doc = new Document(@"C:\Temp\src_file.odt");

Document firstPage = doc.ExtractPages(0, 1);
Document restPages = doc.ExtractPages(1, doc.PageCount - 1);
restPages.FirstSection.PageSetup.LeftMargin = 56.7;

firstPage.AppendDocument(restPages, ImportFormatMode.UseDestinationStyles);

firstPage.Save(@"C:\Temp\out.doc");