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

Free Support Forum - aspose.com

Docx to mhtml with embedded images conversion issues

So I have a docx file with an embedded image, in Word I do a Save As… to an mhtml file and in code I use:

Document doc = new Document(stream);
MemoryStream streamOut = new MemoryStream();
doc.Save(streamOut, SaveFormat.Mhtml);

where the stream is a docx document. From Word’s Save As… I get:

MIME-Version: 1.0
Content-Type: multipart/related; boundary="----=_NextPart_01D0CA10.60EEBAD0"

This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn’t support Web Archive files. Please download a browser that supports Web Archive, such as Windows® Internet Explorer®.

Content-Location: file:///C:/0E2BA210/word_converted_temp.htm
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=“us-ascii"

From code I get:

MIME-Version: 1.0
Content-Type: multipart/related;

This is a multi-part message in MIME format.

Content-Disposition: inline;
Content-Type: text/html;
Content-Transfer-Encoding: quoted-printable
Content-Location: document.html

I’d like for the code converted project to prepend the file:///C:/0E2BA210/ to document.html. I was also trying to remove: Content-Disposition: inline; Any help would be great. Thanks.

Hi Steve,

Please check the example at http://www.aspose.com/docs/display/wordsnet/Sending+to+a+Client+Browser and attach your input document and sample application if your requirement is different.

Best Regards,