jsPDF icon indicating copy to clipboard operation
jsPDF copied to clipboard

html: support CSS page-break-after: avoid

Open ssagiyev-va opened this issue 3 years ago • 2 comments

When I export to PDF, I get long table tables. I need it to not break after thead and tbody > tr:first-child. I wrote it like this: table thead, table tbody > tr:first-child { page-break-after: avoid; } but it doesn't work. Can you give me some advice? Screen Shot 2022-02-11 at 12 14 40 AM Screen Shot 2022-02-11 at 12 11 15 AM

ssagiyev-va avatar Feb 10 '22 22:02 ssagiyev-va

I don't think that's possible ATM. It would also be hard to implement in jsPDF.

You might split your HTML beforehand and call html() multiple times.

HackbrettXXX avatar Feb 11 '22 15:02 HackbrettXXX

I don't think that's possible ATM. It would also be hard to implement in jsPDF.

You might split your HTML beforehand and call html() multiple times.

How could this be done?

For example, having a list of divs and each div being a page

@HackbrettXXX

doublethink13 avatar Aug 24 '22 15:08 doublethink13