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

Free Support Forum - aspose.com

Indents spacing and table's width are changed after conversion from html to odt

Hi sirs,
I use Aspose.Words Convert html to odt file.

indents spacing and table's width are changed after conversion from html to odt.
the codes are below, thanks.

string MyDir = @"C:\projects\asposeWord\";
Document doc = new Document(MyDir + "html2Word.html");
foreach (Section section in doc)
section.PageSetup.Orientation = Orientation.Landscape;
doc.UpdateTableLayout();

OdtSaveOptions options = new OdtSaveOptions(SaveFormat.Odt);
options.UseHighQualityRendering = true;
options.PrettyFormat = true;

doc.Save(MyDir + "html2Word.odt", options);

attachments are the testing files.

thanks for your help.
Hi Rainmaker,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issues at our side. For the sake of correction, we have logged these problems in our issue tracking system as follow:

WORDSNET-15077 : Html to Odt conversion issue with indent spacing
WORDSNET-15078 : Html to Odt conversion issue table's width

You will be notified via this forum thread once these issues are resolved. We apologize for your inconvenience.

Hi tahir,

thank for your help.

Hi tahir,

I try save to docx, have the same problems.


string MyDir = @“C:\projects\asposeWord”;
Document doc = new Document(MyDir + “html2Word.html”);
foreach (Section section in doc)
section.PageSetup.Orientation = Orientation.Landscape;
var tbs = doc.GetChildNodes(NodeType.Table, true);
foreach (Table tb in tbs)
{
tb.AutoFit(AutoFitBehavior.AutoFitToContents);
}
doc.UpdateTableLayout();

OoxmlSaveOptions options = new OoxmlSaveOptions(SaveFormat.Docx);
options.Compliance = OoxmlCompliance.Iso29500_2008_Transitional;
options.UseHighQualityRendering = true;
options.PrettyFormat = true;

doc.Save(MyDir + “html2Word.docx”, options);
Hi Rainmaker,

Thanks for your inquiry. We have logged this detail in our issue tracking system. We will inform you via this forum thread once these issues are resolved.

We apologize for your inconvenience.

Dear Sir,

Thanks for your help.

Best Regards,
Rainmaker.

The issues you have found earlier (filed as WORDSNET-16496) have been fixed in this update