General questions

I want to export a block in a textDocument as an image.

like this. 


Does myScript have a way to provide it?

Dear 龚 文益,

Thank you for contacting us.

Currently, if I understand well, you add a Math Block in a text Document and would like to export this Math Block as an image? Let me know if no.

Before calling the export functions, we recommend you call the getSupportedExportMimeTypes function on the block you want to export.

In the case of a Math block, you will see you can export as LATEX, MATHML, DOCX, HTMl AND JIIX. You cannot export as an image.

What do you exactly need? Indeed, otherwise, you can save an image as follows (of course, tune it according to your needs) ; but this will be an image of the screen, not of your block (for such purpose, tune the parameters of the invalidate function to the position of your block)

ImageDrawer drawer = new ImageDrawer();


drawer.invalidate(editor.getRenderer(), 0,0, 100,100,  EnumSet.allOf(IRenderTarget.LayerType.class));


Please let us know if this helps.

Best regards,


Thank you for your help, this is the customer's needs, I can't know what function to use, I will try it according to your prompt, thank you

Dear 龚 文益,

Thank you for the update.

Feel free to contact us if you have any question.

Best regards,


Login or Signup to post a comment