Hello,
It seems that Aspose.Words has a bug whereby converting an RTF document to ODT format can result in the wrong indents for certain style combinations. To see what I mean, please download the attached file, unzip, and use Aspose.Words to convert blockquotes_in_paperback_rtf.rtf to ODT format. (The included blockquotes_in_paperback_odt.odt file shows the results I am getting.)
Scan down to the paragraph starting “Three blockquote paragraphs” and compare the original RTF with the converted ODT to see the problem. You’ll also see the issue with the paragraph starting “One blockquote paragraph” further down.
AsposeIndentsBug.zip (11.6 KB)
Thanks and all the best,
Keith
@kayembi sorry I cannot detect any difference in the indentation of the text, also the text have the same indentation that the ODT document generated by MS Word app.
(Left MS Word generated file, Right the file that you posted)
What I have noticed is that the height of the footers is not the same, and it is also different from the ODT document generated by the MS Word app. I am escalating this issue to be analyzed by the development team. While this issue is being analyzed, you can use the following workaround:
Document doc = new Document(@"C:\Temp\input.rtf", new LoadOptions() { LoadFormat = LoadFormat.Rtf });
OdtSaveOptions saveOpt = new OdtSaveOptions()
{
UseHighQualityRendering = true,
};
MemoryStream odtStream = new MemoryStream();
doc.Save(odtStream, saveOpt);
Document odtDocument = new Document(odtStream, new LoadOptions() { LoadFormat = LoadFormat.Odt });
// If the document have more than 1 Section we must assign those values in a foreach loop
odtDocument.FirstSection.PageSetup.FooterDistance = doc.FirstSection.PageSetup.FooterDistance;
odtDocument.FirstSection.PageSetup.BottomMargin = doc.FirstSection.PageSetup.BottomMargin;
odtDocument.Save(@"C:\Temp\output.odt", saveOpt);
@kayembi
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSNET-25106
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.