Closed davidtweaver closed 7 years ago
Each time you call the cordova.plugins.pdf.htmlToPDF method he makes an offscreen webkit object and iOS/Android takes control stoping JS VM, so for what I see here I think you are better constructing the HTML pages first with the amount of page required and the just make one call to the plugin to generate a PDF for you.
Hmm, what I really need to do is generate multiple PDFs rather than one though.
I've tried passing an array of HTML content to the plugin, but that didn't work either
Ah, I fixed the problem! - in the end I had to recursively call my printPdf function from inside itself for every div tag to get multiple PDFs. It worked fine that way, it's maybe not the most efficient way to do it but it works
Hello again,
I want to use this plugin in a loop like this:
where printToPDF() looks like this:
but on the first iteration of the loop the plugin seems to halt the rest of the loop on execution. Could you tell me how I could use the plugin in a loop?