Reputation: 3327
There is a table at my html page. I have used jSPDF
to convert that html view into PDF. It takes two pages in PDF. So, table header (thead
) is showing at both of the pages. I don't want header in second page. So, I think if I could reduce table size (with column line height etc.), it would fit in one page so that there will be only one thead
. Also, there will be maximum 12 rows in that table always. That's why, I want to fit the view in one page in the PDF. How to do that?
Upvotes: 0
Views: 1610
Reputation: 86
I faced a similar issue. Changing the line : var doc = new jsPDF();
to
var doc = new jsPDF('portrait', 'pt', 'a4');
solves the problem. The table now fits in a single page as shown here.
Upvotes: 2