Export Datatable as PDF and have Print Options (Non-Flash solution?)

Export Datatable as PDF and have Print Options (Non-Flash solution?)

redwallredwall Posts: 11Questions: 1Answers: 0
edited May 2013 in Plug-ins
Hi,

I took a look at Table Tools http://datatables.net/extras/tabletools/ and it looks exactly like what I am looking for. Only issue it, it is in Flash and that is a bit of a turn off for compatibility reasons for my project. iPad for example.

Does anyone know of any other solutions to implement a save to PDF and print solution without the use of Flash?

Thanks Red

Replies

  • stefankrugerstefankruger Posts: 3Questions: 0Answers: 0
    is your datatable server side ?

    If so you can use HTML2PDF for PDF.

    You will be required to code the PHP outputing the datatable but if it's server side you just have to call the same URL and truncate some arguments if you want to override the pagination.
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Yup, server side is your only other option. HTML5 just doesn't provide an API that we could use to create and save the PDF in a cross browser way.

    Allan
  • MikeSMikeS Posts: 113Questions: 1Answers: 0
    For what it's worth, there's this project http://jspdf.com/

    I don't have a clue if dataTables could possibly use what that project has to offer but I figured that I'd throw it out there. Maybe someone can make the magic happen :)
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Now that does look interesting. Thank you for the link. I'll investigate this more closely once DataTables 1.0 is out of the door.

    Allan
This discussion has been closed.