canvas2pdf
canvas2pdf copied to clipboard
Can we use existing canvas created by another library?
For example, fabric.js can create a canvas. Can I use this canvas or somehow convert to mock canvas used by canvas2pdf in order to create a pdf from it?
I'd like to know that also.
Any update ?
I like to know that also. Can i load JSON exported in fabric into canvas2pdf canvas (mock)?
Since this was asked more than a year ago and no reply has been made, I can only assume that it is not possible. Has anyone found a good alternative? I am using fabric.js as well.
I was looking for this, but found that it is possible to save a canvas as a png or jpg using toDataURL
(see https://stackoverflow.com/questions/923885/capture-html-canvas-as-gif-jpg-png-pdf). Then you'd use PDFKit to display the canvas as an image using the image loading described here: https://pdfkit.org/docs/images.html