Search code examples
jspdfjspdf-autotable

Show head only for first page in jspdf-autotable 3.1.1


I am using jspdf-autotable for generating pdf report. I want the header text will only be shown for the first page but not working when setting this option showHead: 'firstPage' For example: Here is a jsfiddle

Can anyone help me?


Solution

  • The showHead option is for the table header and will not affect the hooks. If you want to have the same behavior for the hooks you can check the data parameter data.pageNumber and conditionally draw your content base on it.