How can I print a disclaimer at the bottom of every printed page?

How can I print a disclaimer at the bottom of every printed page?

pmconsultingpmconsulting Posts: 36Questions: 11Answers: 0

Link to test case: https://rpeproductcatalog.com/product-list-std/
Debugger code (debug.datatables.net): N/A
Error messages shown: none
Description of problem:

I'm using he browser's print function triggered by clicking the Print button at the top of the datatable.

Everything prints fine. I have a disclaimer with a dynamic date at the bottom of the entire table which prints on the last page of the printed version.

Is it possible to place the disclaimer into a footer and have it printed at the bottom of every printed page?

Answers

  • allanallan Posts: 63,450Questions: 1Answers: 10,465 Site admin

    It looks like the running() position property in CSS is what you want. You could use messageBottom to create the HTML, and that add that CSS into your document, which the print button will copy across to the print view.

    What I couldn't find is how widely that is supported in browsers. Hopefully there will be good support given it is 2014, but since MDN and Can I Use don't list it... I'm not sure! If you find out, let us know :)

    Allan

  • pmconsultingpmconsulting Posts: 36Questions: 11Answers: 0
    edited November 2023

    It's even easier than that. My table has
    <thead>
    <tr>
    <td>
    ...
    So I just added
    <tfoot>
    <tr>
    <td colspan="xx">
    ...

    Whatever is in the header and footer is printed on every page automatically.

    Check it out (takes a while to load): https://rpeproductcatalog.com/product-list-lrg/

  • allanallan Posts: 63,450Questions: 1Answers: 10,465 Site admin

    Awesome! Thanks for letting me know.

    Allan

Sign In or Register to comment.