I am trying to create the pdf file from an image file, but getting the blank pdf file. I draw an image file into the canvas and then trying to create the pdf file.
I am using html2canvas
and jspdf
here is my jsfiddle
Yesterday i got the same task, this is my code https://jsfiddle.net/qe884617/
but when exporting pdf you will get a security error about Tainted canvases may not be exported.
you have to make the image was on the same server as page address. You may read further information here
This is another approach using fabric.js, see here to run you have to Allow-Control-Allow-Origin:* on document header. Or just install google chrome CORS addon