Php to PDF , file gets cut off and does not create second page

Viewed 25

I am making a wordpress plugin to make a PDF file from posts (no header and no footer) i can extract all the information i want, but since im now doing the styling it all goes wrong. Normally if 1 page of the PDF is to small to fit all the text and images it automatically creates a second or third page. but now the text just gets cut of as you can see on the image, it only created 1 page and cuts off the text once full

the code:

(WillShowThirdImage === true) {
    a.document.write('<html> <body > <style> h6{ color: blue; font-size: 2rem; margin: 0;} .split { height: 100%; width: 50%; position: fixed;} .left {left: 0; height: 100%;} .right { right: 0; height:100%} </style> <h1>' + TitelPrint + '</h1>');
    a.document.write('<div class="split right">');
    a.document.write('<img style="border: solid; max-height: 225px; max-width: 225px" src="' + Image0 + '"/> <img style="border: solid; max-height: 225px; max-width: 225px" src="' + Image1 + '"/> <img style="border: solid; max-height: 225px; max-width: 225px" src="' + Image2 + '"/>');
    a.document.write('</div>');

    if (WillShowText === true) {
        a.document.write('<div class="split left">');
        a.document.write(TextInfo);
        a.document.write('<div style="font-size: medium">' + TextWerkzaamheden + '</div> <div style="font-size: medium">' + TextProject + '</div> </div> </body></html>');
    } else {
        a.document.write('<div class="split left"> <div style="font-size: medium">' + TextWerkzaamheden + '</div> <div style="font-size: medium">' + TextProject + '</div> </div> </body></html>');```
    }
    a.print();
0 Answers
Related