I am trying to display multiple images in a PDF using jspdf. It only shows the first image. It's not showing another image? Can we show multiple images using jspdf? Here is my code:
PLUNKER: http://plnkr.co/edit/HxharsFKeOPn2JgTb6pu?p=preview
var doc = new jsPDF();
doc.setFontSize(40);
doc.text(35, 25, "Paranyan loves jsPDF");
doc.addImage(imgData, 'JPEG', 15, 40, 180, 180, 'Octonyan');
doc.addImage('Octonyan', 'JPEG', 15, 400, 180, 180);
doc.save('Test.pdf');
You're adding an image outside of the page of a single-paged document The following works, mind the changed
y
coordinate400 -> 220