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

Free Support Forum - aspose.com

Text content missing in .mhtml file after converting from docx to mhtml using java

I am trying to convert a docx file to single file web page (i.e mhtml) . My doc file contains some texts and images . when converting the file with different saveOptions into .mhtml text contents are missing in the web file.

Please suggest me the possible reason for this and provide sample code for the same.

@Rit365 Could you please attach your input and output documents here for testing? We will check the issue and provide you more information.

Please find the document attached.testDocA.docx (44.7 KB)

Note : Please also suggest how i can remove the headers ,footers and watermark which got added automatically on creating a docx file through aspose. (same you can find in the attached doc as well) .

@Rit365 Unfortunately, I cannot reproduce the problem on my side. I have used the following simple code for testing:

Document doc = new Document("C:\\Temp\\in.docx");
doc.save("C:\\Temp\\out.mhtml");

As I can see none of the source document content is lost in the output MHTML document. Could you please also zip and attach your output MHTML document here for our reference and show the problem on the screenshot?