My "page break" with CSS doesn't work for my jsPDF with .html() in React

Viewed 498

I've been trying to make a "page break" using CSS but it doesn't work. I'm using jsPDF and getting the from a DOM created with my React Component:

    let doc = new jsPDF('p', 'pt', 'letter')
    let source = document.getElementById('pdfContent')
    doc.html( source, {
        html2canvas: {
            scale: 0.55,
            windowWidth: 1024,
            windowHeight: 10

        },
        callback: function (doc) {
            doc.save('My_pdf');
        }
     })

And i'm using the following CSS:

.page-break {
     page-break-after: always;
     page-break-inside: avoid;
     clear:both;
 }
0 Answers
Related