Print title on each page based on a column value

Print title on each page based on a column value

aziz30aziz30 Posts: 6Questions: 3Answers: 0

In my project, I have to print a table that has hundreds of row consists of.

"Name", "Position", "Office Address", "Age", "Start Date", "Salary"

Datatables print a title only in first page but I have to add title in every page. In every office location there is many user and I have to add a custom title each page based on ''Office" location, and add a page break when all users of a office location is printed and then print new office's user to a separate page and add 'Office' name as custom title.

Is there any way to do that? any help is appreciated.

Sample JSFIDDLE https://jsfiddle.net/eLLc2hoc/2/

Replies

  • colincolin Posts: 15,152Questions: 1Answers: 2,587

    Hi @Aziz30,

    The best bet there is to do it in the header - see the example here.

    You would probably want to change the font size to suit your needs, there's example in the pdfmake playground for that.

    Cheers,

    Colin

This discussion has been closed.