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

Free Support Forum - aspose.com

The Word table is shrinking when saving in HTML format

Hello!

Please look at two attached files. File InputWord.docx created by Aspose with Office 2010 (the same issue
happens with Office 2007). When saving file in Html format (see code example) the
table is shrinking.

Then open and save that file with
Office Word 2007 or 2010 (file InputWord_SavedAs.docx). Then save it in html format (run code).
Table is formatted properly.

----

string fileName = GetPathFile() + "InputWord.docx";
string HTMLPath = GetPathFile() + "OutputHtml.html";
// string fileName = GetPathFile() + "InputWord_SavedAs.docx";
// string HTMLPath = GetPathFile() + "OutputHtml_SavedAs.html";

Aspose.Words.Document doc = new Aspose.Words.Document(fileName);
doc.Save(HTMLPath, new Aspose.Words.Saving.HtmlSaveOptions
{
ExportXhtmlTransitional = true,
TableWidthOutputMode = Aspose.Words.Saving.HtmlElementSizeOutputMode.All,
SaveFormat = Aspose.Words.SaveFormat.Html

});

Could you please help us with this?

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

Thanks for the query. Unfortunately, we are unable to open attached source files. Please share these files again as to investigate the issue we need to reproduce issue at our side and can you please inform which tool you are using to generate the source file.

Sorry for the inconvenience faced.

Regards,

I saved file using ‘Save’ method. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Aspose.Words.Document doc = new Aspose.Words.Document();

…..

doc.Save(FS);

Please rename those file to extension .docm and change code accordingly.

Thank you!

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

I have tested your attached documents by changing file extension to .docm using your code snippet with latest Aspose.Words 11.4.0 API and unable to find any issue, output files are attached here for reference . Please try latest Aspose.Words API for the purpose and hopefully your issue will be resolved. If it persist then please share the code snippet used to generate source file (InputWord.docm) and output files as well for further investigation.

Best Regards,

Hi Ahmad,

I attached
two html files. File TestOutputHtml2.html has been saved from InputWord.docx. In
its turn file TestOutputHtml2_SavedAs.html has been generated after file InputWord.docx
had been opened and ‘saved as’ with name InputWord_SavedAs.docx (you could save
with the same name).

Thank you,

Inga

It is still reproducible with Aspose.Words 11.4.0.

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

While using the latest version of Aspose.Words i.e. 11.4.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system as WORDSNET-6466. Your request has also been linked to this issue and you will be notified as soon as it is resolved.

Sorry for the inconvenience.

Best Regards,

The issues you have found earlier (filed as WORDSNET-6466) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.