Java JEuclid-设置从MathML转换的图像的大小
我正在寻找一种在MathML到图像转换后设置输出图像维度的方法。我写了一个简单的代码:Java JEuclid-设置从MathML转换的图像的大小,java,image,mathml,Java,Image,Mathml,我正在寻找一种在MathML到图像转换后设置输出图像维度的方法。我写了一个简单的代码: public static void main(String[] args) throws IOException { Converter converter = Converter.getInstance(); converter.convert(new File("C:\\test.html"), new File("C:\\out.jpg"), "image/jpeg")
public static void main(String[] args) throws IOException {
Converter converter = Converter.getInstance();
converter.convert(new File("C:\\test.html"),
new File("C:\\out.jpg"), "image/jpeg");
}
test.html看起来像:
<?xml version="1.0"?>
<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/TR/MathML2/dtd/mathml2.dtd">
<math mode="display">
<mrow>
<munderover>
<mo>∫</mo>
<mn>1</mn>
<mi>x</mi>
</munderover>
<mfrac>
<mi>dt</mi>
<mi>t</mi>
</mfrac>
</mrow>
</math>
你知道我可以操作这个维度的方法吗?我找到了一种方法,这里有帮助的参数是:
params.setParameter(Parameter.MATHSIZE, 50f);
我发现“”标记在这里可能是一个问题,所以为了使它工作,我必须先去掉它们
params.setParameter(Parameter.MATHSIZE, 50f);