jsPDF page break
Asked Answered
R

1

4

I have 2 divs in my page tab1 and tab2.

I would like to export both divs in 1 PDF file with tab1 as the 1st page and tab2 starting from the following page.

Currently the 2nd div appears broken in the exported file hence I would like to have the div appear from the next page.

Any help would be appreciated.

Recurrence answered 30/3, 2016 at 5:20 Comment(0)
C
3

Just use <!--ADD_PAGE--> (ADD_PAGE with in commented angular <> braces) from where you want new page. It works.

Constellate answered 13/4, 2016 at 9:23 Comment(2)
<!-- ADD_PAGE --> only works if you're using fromHTML method pdf.fromHTML();Emotional
As @Emotional says above. Also pdf.fromHTML appears to be deprecated and is not available in the latest releases.Pepin

© 2022 - 2024 — McMap. All rights reserved.