I\'ve started using PDF.js, an excelent work, by the way.
But now I want to insert an image (from a canvas element) on the pdf page. Here\'s my code:
If I understand your question correctly you want to use an instead of a with pdf.js.
So here is my fix for this problem, insert the returned image in a canvas as normal, give the canvas a display: none;.
Then use the .toDataURL() method of the canvas element to get a src for your img.
var canvas = document.getElementById("myCanves");
var img = document.getElementById("myImg");
img.src = canvas.toDataURL();
I hope this helps.