Tabulator: Option to assign printHeader and printFooter during runtime

Created on 24 Jul 2019  路  3Comments  路  Source: olifolkerd/tabulator

It will be nice if there is an option to assign printHeader and printFooter values during runtime (just before printing).

My reports are loaded using ajax based on a number of filter parameters selected by the user.
I want to show those parameters in the report header (printHeader) in the print copy.

Maybe, setPrintHeader and setPrintFooter functions will be good.

Hope I didn't miss it, if this feature is already there.

Question - Ask On Stack Overflow

All 3 comments

I have not actually done it but the below looks like what you are after:
http://tabulator.info/docs/4.3/print#print
"Print Formatting

The printFormatter table setup option allows you to carry out any manipulation of the print output before it is displayed to the user for printing"

Hey @aditya-thimphu

As it states in the documentation that @aklaver has helpfully posted, you can pass a callback function into both the printHeader and printFooter functions that will be called while the printout is being created. They should either return an HTML string or a dom node to be inserted into the header/footer

Cheers

Oli :)

Thanks @olifolkerd and @aklaver. That's helpful.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

soo1025 picture soo1025  路  3Comments

alainpannetier picture alainpannetier  路  3Comments

Honiah picture Honiah  路  3Comments

mconnelley picture mconnelley  路  3Comments

tomheaps picture tomheaps  路  3Comments