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

Free Support Forum - aspose.com

Table alignment is missing in HTML after Exporting from DOCX using ASPOSE


Table alignment is not proper after exporting to HTML using ASPOSE.

RMP_Trustwide_Discharge_Summary201402111022_orignial.docx is the original DOCX file where the table alignment is proper.

RMP_Trustwide_Discharge_Summary201402111022.txt(Rename to RMP_Trustwide_Discharge_Summary201402111022.htm before opening the file) - open this file IE and you could see that Table alignment is not proper.

Refer Table Alignment Mismatch between HTML and DOCX file.docx conatins screen shot of both DOCX and HTML file.

Would please check this issue and let us know?

Hi Rathinam,

Thanks for your inquiry. Please note that it is not guaranteed that the output HTML file will look exactly the same as the input Word document. If you re-save this document to HTML format using Microsoft Word 2013, you’ll observe similar problems. In this case, you may want to save this document in the HTML format using absolutely positioned elements as follows:

Document doc = new Document(@“C:\Temp</font>RMP_Trustwide_Discharge_Summary201402111022_orignial.docx”);
doc.Save(@“C:\Temp\out.html”, SaveFormat.HtmlFixed);

Please let me know if I can be of any further assistance.

Best regards,


Thanks for your reply. We have implemented based on your recommandation but we are getting exception.

Implemented code using docx bytes

Aspose.Words.Saving.HtmlSaveOptions options = new Aspose.Words.Saving.HtmlSaveOptions(SaveFormat.HtmlFixed);

options.ExportImagesAsBase64 = true;

options.ExportHeadersFootersMode = Aspose.Words.Saving.ExportHeadersFootersMode.None;


Pl. find the attached exception image.



Hi Rathinam,

Thanks for your inquiry. Please use HtmlFixedSaveOptions class to specify additional options when saving a document into the HtmlFixed format.

Bets regards,


We have implemented with HtmlFixedSaveOptions but still we are getting exception.

Implemented code

Aspose.Words.Saving.HtmlFixedSaveOptions options = new Aspose.Words.Saving.HtmlFixedSaveOptions();

doc.Save(finaloutstream, options);

docBytes = finaloutstream.ToArray()

UTF8Encoding utfEncoding = new UTF8Encoding();

if (docBytes.Length > 0)


stringData = utfEncoding.GetString(docBytes);


let us know if we are missing any option.



Hi Rathinam,

Thanks for your inquiry. In this case, Aspose.Words needs to store images, embedded CSS, Fonts and SVG somewhere on disk. You can workaround this problem by simply specifying a ResourceFolder as follows:

Document doc = new
Document(MyDir + @“Table+Alignment+Mismatch+between+HTML+and+DOCX+file.docx”);

MemoryStream stream = new MemoryStream();

HtmlFixedSaveOptions so = new HtmlFixedSaveOptions();

so.ResourcesFolder = @"C:\Temp";

doc.Save(stream, so);

I hope, this helps.

Best regards,


Thanks for your reply. It is working fine for IE9 and IE10 except IE8.0. I have attached exported HTML and Open in IE8.0

Let us know if any solution for IE8.0



Hi Rathinam,

Thanks for your inquiry. For viewing Aspose.Words generated HtmlFixed format, please use Google Chrome or any browser that supports SVG (Scalable Vector Graphics). Please use Internet Explorer 9 as the earlier versions of IE don't support SVG. I hope, this helps.

Best regards,