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

Free Support Forum - aspose.com

Office Math Image Export


I am trying to export a docx as html / mhtml file which usually works as expected. However, when we have Office Math object in the document it loses some details such as the dividing line in the attached docx.

Can you suggest a way to get the image to come back correctly?


Hi Saar,

Thanks for your inquiry.

I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10708. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Saar,

Thanks for your patience. In your case, we suggest you please use HtmlSaveOptions.ScaleImageToShapeSize property as shown in following code snippet to get the required output. The default value of HtmlSaveOptions.ScaleImageToShapeSize is true.

Please let us know if you have any more queries.

Document doc = new Document(MyDir + "DEBUG_MathML.docx");
HtmlSaveOptions saveoptions = new HtmlSaveOptions();
saveoptions.ScaleImageToShapeSize = false;
doc.Save(MyDir + "Out.html", saveoptions);