Export to PDF Freezing Before Processing

Export to PDF Freezing Before Processing

GMUDuckmanGMUDuckman Posts: 5Questions: 1Answers: 0

Working with a relatively large dataset, so I understand why it may take a while for the PDF to be created and export, however, there is a long pause (long enough to have chrome say the page isn't responding) before the processing starts after clicking the button. If I filter down the list, it just pauses the whole page and never displays the processing icon on the button. Using the most recent version of Datatables, Buttons, and PDFmake. Any ideas?

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @GMUDuckman ,

    This thread should help, it's asking the same thing. If not, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • GMUDuckmanGMUDuckman Posts: 5Questions: 1Answers: 0

    Hi Colin,

    I tried rolling back to 1.10.16 but no luck. We can't really do a server side export because the application we are creating needs to be heavily transportable and not reliant on server-side technology being consistent.

    :-(

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @GMUDuckman ,

    As I said, if you could link to the page or create a test case, we can see if there's any optimisations you could make. Without seeing it, it's hard to make suggestions.

    Cheers,

    Colin

  • GMUDuckmanGMUDuckman Posts: 5Questions: 1Answers: 0

    https://jsfiddle.net/ovfgpw3u/1/

    Here is a link to an example. I've loaded a bunch of data into the table. Regardless of I've tried 1.10.16 through 1.10.18. From my understanding it should be processing in the background while the PDF button spins.

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Hi @GMUDuckman ,

    Thanks for that fiddle. It's interesting that the CSV/Excel exports are almost instantaneous yet the PDF struggles as you say. I've raised it internally (DD-886 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

  • GMUDuckmanGMUDuckman Posts: 5Questions: 1Answers: 0

    Thanks - on the actual data i'm using (far bigger), I'm finding the CSV and Excel also hang, but not nearly as long. I did find that dataExport() looks to be synchronous and I believe the buttons are using that method. When calling dataExport() directly the browser also hangs.

  • GMUDuckmanGMUDuckman Posts: 5Questions: 1Answers: 0

    I ended up making my own custom function for pdfmaker and using a web worker to allow for a download dialog with progress bar :-)

This discussion has been closed.