Skip to content Skip to sidebar Skip to footer

Jspdf - Use Lots And Lots Of Images

In JSPDF, my goal is to create a document that can vary from 1 to 1000 pages. Moreover, there are about 10-30 images on each page. I am using the basic syntax: var doc, exampleImg;

Solution 1:

Well, this is a pretty hacky solution, but it works.

If looping, you can use setTimeout / setInterval and time it out before you actually go ahead and print the images to the PDF. It now works flawlessly... except that there's a couple seconds more of load time for the larger PDFs.

I used setTimeout(10) just to be extra safe.

Post a Comment for "Jspdf - Use Lots And Lots Of Images"