Image base64 and fromHTML method in jsPDF
Hey people :)
i'm here because i use the method fromHTML to render my page into PDF and there is a problem on image render, I got some svg into this so i transform them into base64 png like this:
<someHtml>...<img src="data:image/png;base64,iVBORw0KGgoAAAA..." />...<someHtml>
what i got by transforming svg into base64 png:

And now what i got when I use fromHTML with this html:

So we can see that the text is good but the image appear with a little zoom and blur, that's how I call the generation of PDF:
doc.fromHTML(document.body, 15, 15,{ 'width': 560 }, function(){ doc.save(nameFichier+'.pdf'); });
Hi there,
There's now an svg example :)
Get the latest master and try:
npm install
npm start
Then visit localhost:8000/examples/canvg_context2d/bar_graph_with_text_and_lines.html
Hope this works well for you :)
Many thanks, James
maybe this helps you https://github.com/MrRio/jsPDF/issues/944