pdf export with Server side processing

pdf export with Server side processing

calacala Posts: 52Questions: 15Answers: 0

Hi!

How can I export the entire table (or a filtered version of it, but always hundreds of lines) with the serverSide processing enabled?

Thank you!

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 63,075Questions: 1Answers: 10,385 Site admin
    Answer ✓

    You have two options:

    1. Create the PDF server-side and download it (I would suggest this)
    2. Disable server-side processing

    The PDF created client-side can only work with the data that is available at the client-side, and since the whole point of server-side processing is that the full data set is not at the client-side, the two obviously don't play well together.

    Allan

  • calacala Posts: 52Questions: 15Answers: 0

    Are there some functions of DataTable to create the pdf server-side or it's all in my hand?

    Thank you!

  • allanallan Posts: 63,075Questions: 1Answers: 10,385 Site admin
    Answer ✓

    it's all in my hand?

    This one :-)

    Allan

  • jLinuxjLinux Posts: 981Questions: 73Answers: 75

    Think about it tho, if you have the amount of data that exporting all the rows is possible... maybe serverSide isnt really needed. Server side is for hundreds of thousands and even millions of rows.. stuff you cant just attach to a pdf

  • calacala Posts: 52Questions: 15Answers: 0

    and if... it's a stupid idea, but...

    when the button is pressed to generate the pdf, if it is possible to disable the paginator (or set it to -1) to recall all the rows and then create the pdf.

    In this way all the rows are "on screen" of the client.

    X-|

  • allanallan Posts: 63,075Questions: 1Answers: 10,385 Site admin
    Answer ✓

    Yes you could do that - but then using server-side processing in the first place is completely redundant since it would then need to load all the data anyway. So all you would be doing is introducing latency into your app by using server-side processing and not getting any benefit!

    Allan

  • calacala Posts: 52Questions: 15Answers: 0

    yeah, that's right... thank you!

  • PulitsPulits Posts: 1Questions: 0Answers: 0

    What I have done is to make my own implementation, in projects using ASP.NET and JSP.

    For ASP.NET I have used the WebMethod and Web API for the server calls. I send the exact same parameters to my export Excel button and I return the required information. I used the EPPlus library for this task.

    For JSP, I used Apache POI to create the Excel. I created the Excel using a WebServlet.

    I hope this helps anyone!

This discussion has been closed.