Search code examples
angularjspdfjspdf-autotable

Using jspdf library How to set a logo on a PDF through API


I can get a png file through 'API'.How can I include it in my PDF? , I'm using jsPDF and jsPDf-autoTable library too. I want the logo before (Header) the table and after (Footer) the table.


Solution

  • I use this method

    var img = new Image()
        img.src = '../../assets/arrow.png'
        var doc = new jsPDF("p", "pt", "a4")
        doc.addImage(img, 40, 30, 100, 76)