Hi,
We have a problem with mathematical formulas using Aspose.words.jdk16 for java,(version 17.7) I am not able to print some mathematical formulas and getting error while generating pdf.
Document doc = new Document();
DocumentBuilder docBuilder = new DocumentBuilder(doc);
String mathEquation1 = "<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'>
<mfrac linethickness='3px'> <mfrac bevelled='true'> <mn>1</mn> <mi>x</mi>
</mfrac> <mrow> <mi>y</mi> <mo>−</mo> <mn>2</mn> </mrow> </mfrac></math>";
String mathEquation2 = "<math xmlns='http://www.w3.org/1998/Math/MathML'> <msup> <mrow> <mo>(</mo> <mrow> <mrow><mn>3</mn><mi>x</mi></mrow> <mo>-</mo> <mrow><mn>2</mn><mi>y</mi></mrow> </mrow> <mo>)</mo> </mrow> <mn>2</mn> </msup></math>";
String mathEquation3 = "<math xmlns='http://www.w3.org/1998/Math/MathML'> <mrow> <msup> <mfenced> <mrow> <mi>a</mi> <mo>+</mo> <mi>b</mi> </mrow> </mfenced> <mn>2</mn> </msup> </mrow> </math>";
docBuilder.insertHtml(mathEquation1);
docBuilder.insertHtml("<br>");
docBuilder.insertHtml(mathEquation2);
docBuilder.insertHtml("<br>");
docBuilder.insertHtml(mathEquation3);
doc.updateFields();
doc.save("D:\\MathEquation.pdf");