Reputation: 77
I am doing a project for school. Subject of project is tshirt design. I am using jsf and primefaces. But I don't know well jsf and primefaces. I have a problem. In a div, a design is done, then I wanted to save in div content as image file. Can I do with using HTML5? How do I add html5 to JSF project? How do I process?
Upvotes: 1
Views: 2892
Reputation: 166
Create a canvas with wanted size, load your graphics stuff in the canvas and then use the canvas.toDataURL(fileType) to get the file content as base64, here is the link http://tutorials.jenkov.com/html5-canvas/todataurl.html
Upvotes: 1