HTML2PDF entire paragraph carried onto next page

13
March 15, 2019, at 04:20 AM

I'm using html2pdf by spipu

I am outputting a PDF document based on some user inputs, all works fine but the last paragraph is pretty large and the entire paragraph is carried onto the next page and it leaves a big blank space on page 1.

I've reduced page margins quite a lot but it's not enough to pull the last paragraph entirely onto page 1.

Is there any way to make it page break instead of carrying the entire paragraph to a new page (where it does the same thing to the next)

Here is a sample of the php code:

$html2pdf = new Html2Pdf('P','A4','en', true, 'UTF-8',array(11, 3, 16, 3));
    $html2pdf->addFont("verdana","", "verdana.php");
    $html2pdf->setFallbackImage("");
    $html2pdf->setTestTdInOnePage(false);
    $styles = '<style>li{ padding-top: 10px; font-size:15px; line-height: 20px; } page{font-size: .9em; } .ft0 { font-size: 15px; line-height: 17px; } .ft9 { font-size: 15px; line-height: 21px;} </style>';
    $html2pdf->writeHTML($styles . $html);
    $html2pdf->output($path. ".pdf",'F');
    $html_file = fopen($path . ".html", "w") or die("Unable to open file!");
    fwrite($html_file, $content);
READ ALSO
page.aspx and code behind (page.aspx.vb) relations problems

page.aspx and code behind (page.aspx.vb) relations problems

I’m working in a web project and I decide to turn in MVC 4 from ASPNET

47
Archive without root folder in .zip [node-archiver]

Archive without root folder in .zip [node-archiver]

I'm using node-archiver to archive folder "export" with photos inside

28
How to set the duration of after-hover transition

How to set the duration of after-hover transition

I would like to get the same time (04s) after hover off from button (now is 0s)

40
gridSearchCV performance measurement

gridSearchCV performance measurement

I have an assignment and it asks me to:

20