Load PDF into fabricjs canvas
问题 I have a fabricjs canvas that I need to input a PDF, similar to how images are loaded. I expect that I'd need to convert the PDF to a PNG via PDFjs before loading onto canvas? document.getElementById('imgLoader').onchange = function handleImage(e) { var reader = new FileReader(); reader.onload = function (event) { console.log('fdsf'); var imgObj = new Image(); imgObj.src = event.target.result; imgObj.onload = function () { var image = new fabric.Image(imgObj); image.set({ left: 320, top: 5, }