How do I get the print button to work?
How do I get the print button to work?
timesharesoftware
Posts: 5Questions: 2Answers: 0
I have looked high and low to figure out how to get the printer friendly button to work.
I have used this to load the Extentions
https://cdn.datatables.net/v/ju/dt-1.10.13/b-1.2.4/b-html5-1.2.4/cr-1.3.2/fc-3.2.2/fh-3.1.2/r-2.1.1/datatables.min.js
Not sure what to do next, I tried to add print to the buttons array but no joy.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
This link lists the additional JS includes needed for each of the buttons.
https://datatables.net/download/release#Buttons
For
print
you also need to include:https://cdn.datatables.net/buttons/1.2.4/js/buttons.print.min.js
Kevin
Add
b-print-1.2.4
into your CDN URL, or use the download builder to add the print button type.Allan
Excellent I overlooked some part. of the builder.
The print functions works but in the console of the debugger on the web page I get this error:
Failed to load resource: the server responded with a status of 404
https://cdn.datatables.net/v/dt/jszip-2.5.0/pdfmake-0.1.18/dt-1.10.13/b-1.2.4/b-colvis-1.2.4/b-flash-1.2.4/b-html5-1.2.4/b-print-1.2.4/cr-1.3.2/fc-3.2.2/fh-3.1.2/r-2.1.1/rr-1.2.0/sc-1.4.2/se-1.2.0/pdfmake.min.js.map
Not sure if I should open another thread. but here goes.
The print function does not print the footer. Is this correct?
Thanks. I need to change the download builder slightly. Don't worry about that error the map file is just a reverse debug file that can help with debugging.
If you don't have the
footer
option enabled forprint
, then yes, that is correct.Allan