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

Free Support Forum - aspose.com

Export Html from DOCX byte array

I am converting docx byte array to html export. During export ,chunk data added at the end of html.

In Table columns word wrap not happenning. I have attache exported html and docx file.

Implemented code:

byte[] docx = System.IO.File.ReadAllBytes(sFileName);

byte[] docBytes = null;

Document doc = null;

using (MemoryStream outStream = new MemoryStream(docx))


doc = new Document(outStream);

outStream.Position = 0;

sStrcontent = null;

switch (Format)


case "HTML":

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

options.ExportImagesAsBase64 = true;

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

doc.Save(outStream, options);



docBytes = outStream.ToArray();


UTF8Encoding utfEncoding = new UTF8Encoding();

if (docBytes.Length > 0)


sStrcontent = utfEncoding.GetString(docBytes);


Sorry we have got the solution. Please do not consider the Post.

Hi Rathinam,

It is nice to hear from you that you have found the solution of your issue. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.