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

Free Support Forum - aspose.com

Error convert word to htm when use OfficeMathOutputMode as MATH_ML

when convert word to htm,if document hava officemath brackests, set mathoutmode as math-ml,this will be a error

options.setOfficeMathOutputMode(HtmlOfficeMathOutputMode.MATH_ML);

java.lang.IllegalStateException
at com.aspose.words.zzZSU.zzZ(Unknown Source)
at com.aspose.words.zzZTE.zzZ(Unknown Source)
at com.aspose.words.zzZTE.zzY(Unknown Source)
at com.aspose.words.zzZTE.zza(Unknown Source)
at com.aspose.words.zzZTE.startElement(Unknown Source)
at com.aspose.words.zzZTC.startElement(Unknown Source)
at com.aspose.words.zzZJB.zzZ(Unknown Source)
at com.aspose.words.zzZJB.visitOfficeMathStart(Unknown Source)
at com.aspose.words.OfficeMath.zzZ(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.OfficeMath.accept(Unknown Source)
at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.OfficeMath.accept(Unknown Source)
at com.aspose.words.zzZJB.visitOfficeMathStart(Unknown Source)
at com.aspose.words.OfficeMath.zzZ(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.OfficeMath.accept(Unknown Source)
at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.OfficeMath.accept(Unknown Source)
at com.aspose.words.zzZJB.zzX(Unknown Source)
at com.aspose.words.zzZJB.zzW(Unknown Source)
at com.aspose.words.zzZJB.visitOfficeMathStart(Unknown Source)
at com.aspose.words.OfficeMath.zzZ(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.OfficeMath.accept(Unknown Source)
at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.OfficeMath.accept(Unknown Source)
at com.aspose.words.zzZJB.zzZ(Unknown Source)
at com.aspose.words.zzZXB.zzY(Unknown Source)
at com.aspose.words.zzZK0.visitOfficeMathStart(Unknown Source)
at com.aspose.words.OfficeMath.zzZ(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.OfficeMath.accept(Unknown Source)
at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.Paragraph.accept(Unknown Source)
at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.Body.accept(Unknown Source)
at com.aspose.words.zzZXB.zzZu(Unknown Source)
at com.aspose.words.zzZXB.zzZ(Unknown Source)
at com.aspose.words.zzZXB.zzZSt(Unknown Source)
at com.aspose.words.zzZXB.zzZSE(Unknown Source)
at com.aspose.words.zzZSP.zzZ(Unknown Source)
at com.aspose.words.zzZHV.zzZ(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.save(Unknown Source)

02.zip (10.8 KB)

how to solve it ,thanks

@hlgao,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-16300. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@tahir.manzoor,

I found another math error,please check it.
03.zip (12.2 KB)

@hlgao,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-16302. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@tahir.manzoor
This math type ΔABC , if convert math-ml, the triangle becomes inclined.
This math type ABCD-A1B1C1D1 , if convert math-ml, where the ABCD is no longer tilted.
This math type a∈R , if convert math-ml, where R is no longer a bold state
Thanks
01.zip (10.9 KB)

@hlgao,

Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for Java 18.1 and have not found the shared issue. Please use Aspose.Words for Java 18.1. We have attached the output MHTML with this post for your kind reference. 18.1.zip (5.3 KB)

Could you please share the Java version that you are using at your end? Thanks for your cooperation.

@tahir.manzoor
Thanks for the answer.
I also use the 18.1 version. You acquiescence the formula to generate pictures. This is no problem. If you choose math-ml, you will have problems. Please look at the pictures I uploaded. I use Firefox 57.0.4 to preview the formula.

try {
	String FileName = "D:/01.docx";
	String DstName = "D:/01.htm";			
	Document WordDoc = new Document(FileName);
	HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.HTML); 
    options.setOfficeMathOutputMode(HtmlOfficeMathOutputMode.MATH_ML);	            
    WordDoc.save(DstName, options);
}catch (Exception e) {
    e.printStackTrace();
}

20180106102452.zip (36.5 KB)

@hlgao,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-16314. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.

Please share the JDK version that you are using at your end. Thanks for your cooperation.

@tahir.manzoor

JaveSE-1.8

Thanks

@hlgao,

The issues you have found earlier (filed as WORDSNET-16300 and WORDSNET-16302) have been fixed in this Aspose.Words for .NET 18.2 update and this Aspose.Words for Java 18.2 update.

Please also check the following articles:

@awais.hafeez
Thank you very much

The issues you have found earlier (filed as WORDSNET-16314) have been fixed in this Aspose.Words for .NET 18.8 update and this Aspose.Words for Java 18.8 update.