I'm looking for a way to set an output image dimension after a MathML to Image convertion. I wrote a simple code:
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 looks like:
<?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>
And as a result I get an Image with dimesion 21x37px. As far I've tried something with (but it does not work):
MutableLayoutContext params = new LayoutContextImpl(
LayoutContextImpl.getDefaultLayoutContext());
params.setParameter(Parameter.?, ?);
Do you know a way I could manipulate this dimesion ?