I am using DataTables.net library but I don't like their print output (Instead, I would like to format my own printable table that looks different from the style of the data-table, but keep the data-table style as is for display non-print purposes).
One option that this library has is to export the data from the table to a JavaScript object, so we can get access to the data from the datable and do whatever we want.
So some options for my solution would be:
1) Create a separate HTML page with the table & css all prepared and do my printing via window.open() with query string parameters and then do window.print() on-load of that.
2) same as #1 but with a big hidden input field and do form post/request.
3) stay on same page, dynamically draw a table, hide everything I don't want to print, do window.print(), then remove from the dom the newly added table and re-show the non-printable stuff.
What do you guys think, is one of those a good solution, or is there a much better option? Note: The data-set is not massive, but could be as much as 30 rows and 10 columns.