Add picture JsPDF

0

I have this script that generates a pdf of a div . But the images that contain div are not generated in pdf , can anyone help me?

$('#downloadpdf').click(function() 
                {
                    var doc = new jsPDF('landscape', 'pt', 'a4');
                        doc.addHTML($('#dowextrato'), function()
                    {
                        doc.save("relatorio-<?php echo $Pnome; ?>.pdf");
                    }); 
                });
    
asked by anonymous 17.05.2017 / 22:34

1 answer

0

Did you add the parameter:

doc.addImage(imgData, 'JPEG', 15, 40, 180, 160) 

In the plugin site there is an example with images.

link

In this demo there is an example with an image in a div.

link

    
18.05.2017 / 00:17