Image Generation

0
Hi,   I have a requirement, in which there should be one page with one entity as data view. User will fill the details (this can be done easily) and clicks on generate button. On click Generate button, i need to create a static image(for example as a signature in mail) and download the same.  Does any one aware of how to generate image(as generate document does not work for images) and download the same?
asked
3 answers
3

Hi Ravindra,

You can use Javascript to achieve feature. Add a new class to your root element which you want generate as image (Example, add new class to your data view or a container) and update the following reference code based on your new class name. Please refer this https://www.geeksforgeeks.org/how-to-convert-an-html-element-or-document-into-image/

Thanks!

answered
1

You can use this widget so that people can sign: https://appstore.home.mendix.com/link/app/107984/Mendix/Signature

And you can use images in document templates. And then use those templates to generate a pdf for instance.

Regards,

Ronald

[EDIT]

You need some code for this. You might want to use https://www.npmjs.com/package/html-to-image It will take a screenshot and inmediately download this.
 

 

answered
0

Hi Ravindra

You can try to generate a PDF and download it as soon as he is generated? It is not a image but it “cannot” be edited. 

https://docs.mendix.com/refguide/generate-document

 

answered