Is there a way to do inline print?

Is there a way to do inline print?

ebarretteebarrette Posts: 1Questions: 1Answers: 0

Hi,

We use a few datatables as part of a page for displaying information related to tenders. One of our requirement is to be able to print the page and table as a whole with the table printed inline. All the example in the documentation (https://datatables.net/extensions/buttons/examples/print/index.html) only allow to print the datatable alone.

Is it possible and how would it be done?

Thanks

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    To do that, you would need to use the browser's standard printing, with paging disabled on the table.

    Colin

  • allanallan Posts: 63,210Questions: 1Answers: 10,415 Site admin

    You could create a custom button that would use page.len() to set the page length to -1 (i.e. show all), then use window.print to show the browser’s print dialogue.

    Allan

This discussion has been closed.