Is it possible to show a spinner while a pdf is created with pdfhtml5
Is it possible to show a spinner while a pdf is created with pdfhtml5
dait
Posts: 3Questions: 1Answers: 0
Hi,
i wonder if there are some events like 'pdf.create.started' and 'pdf.create.done' to be able to show a spinner in the meantime. I have some Datatables where the creation of a PDF with pdfhtml5 of the buttons extension takes quit long. It would be nice to inform the user, that the creation is still in progress.
Thank you in advance!
This discussion has been closed.
Answers
Currently this isn't a feature that is built into the library, but it is something I'm keen to add. I'm not sure yet when I'll get a chance to add it, but it is something that should be available in a future version.
Allan
Thank you allan,
i have tried to insert custom events in buttons.html5.js like this:
However the result is not satisfying. The triggers fire at the very end of the creation process.
As a workaround in the meantime i have found a hint(https://github.com/bpampuch/pdfmake/issues/280) to speed up the creation of larger PDFs by editing the pdfmake.js:
Hope this helps.
Cool - hope that gets merged in :-)
Allan