如何将word里的数学公式转换成图片

请问,如何利用 <span style=“color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-family: “Courier New”;”>Aspose<font color=“BLUE” style=“background-color: rgb(255, 255, 255); font-family: “Courier New”;”>.<span style=“color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-family: “Courier New”;”>words 的 Java API 将 word 中,用户编辑的数学公式检测到,并转换成图片?

嗨,

感谢您的询问。

您可以通过使用以下Aspose.Words for Java代码,将Word文档中的OfficMath对象(方程式)呈现为图像:

Document doc = new Document("D:\\temp\\in.docx");
OfficeMath equation = (OfficeMath) doc.getChildNodes(NodeType.OFFICE_MATH, true).get(0);
equation.getMathRenderer().save("D:\\temp\\img.jpg", new ImageSaveOptions((SaveFormat.JPEG)));

希望这可以帮助。

最好的祝福,