eriktobben's avatar

Generating graphic

Hi!

I am working on a project where a user can input data in form fields, click refresh and the text entered is updated on a preview image.

We are working with vector files, and I was hoping I could create the template in Illustrator, save it as svg and upload it to the server where the users input gets updated on the graphic server-side and served to the user as a png file.

The reason for using vector graphic is because the final file will be printed, and I want the good quality on the printout.

Is this even possible? How do others generate images server-side where the design is fairly complex? I have tried searching but I do not find anything close to what I am looking for.

Thanks!

0 likes
3 replies
mehany's avatar

Sure, you can export your template from Illustrator. Then use the HTML canvas API to convert to png when needed ( without refreshing the page ). I would use D3.js for this kind of work which will allow manipulation of svg content on the front-end. Or something more lightweight and with less function like svgjs, there is quite a few out there. Then you can always upload the svg file to the server. With this approach you free up server resources, hope that make sense!

Please or to participate in this conversation.