datatable library showing poor performance while creating pdf
datatable library showing poor performance while creating pdf
Sudipta
Posts: 23Questions: 0Answers: 0
Hello,
I am using datatable library for generating pdf reports of some tables which contains about 7000-8000 row. The previous version of datatable using flash can generate the report within second , but currently it is taking almost 15 minutes, which is not acceptable in my case. Otherwise a great library. Can someone shed some light ?? Thanks
This discussion has been closed.
Replies
I presume you are using the third party pdfmake library for the PDF generation? DataTables itself does not create PDFs, but rather uses third party sources to do so. My examples use pdfmake, but I have noticed in the past that it gets exceptionally slow for larger tables.
Unfortunately there aren't many alternatives at the moment (suggestions welcome).
What I recommend for large tables is that you create the PDF server-side and download it to the client.
Allan
Ok, I have changed the code use the flash pdf component. But in this case, no download progress/notification is displayed, as is displayed by normal file download.
That sounds like good old Flash to me :-). Its API doesn't provide options for that - it just creates the file and is downloads it.
Allan
Thanks for reply, can jspdf library from Mozilla or chrome be used for pdf generation?
There are two reasons I didn't use jspdf:
Having said that, it is possible I might have to circle back to it as the options are limited in this area. The other option would be to provide a web service to create the html tables, but I'd rather avoid that if possible.
Allan