This is an archived forum post. The information may be outdated. Contact us if you have any questions.

long table rows split true pages

skillup wrote on 2016-01-16:
Hi, I have a long table. The problem is that the table is not broken into pages, so some of my rows are cut in half. The first half on one page and the second on the other.

How can I fix this?

You can see this in action by passing this url on the pdfcrowd website:

My php-code:
// convert a web page and store the generated PDF into a $pdf variable
      $pdf = $client->convertURI('' . $id);

      // set HTTP response headers
      header("Content-Type: application/pdf");
      header("Cache-Control: max-age=0");
      header("Accept-Ranges: none");
      header("Content-Disposition: attachment; filename=\"training.pdf\"");

      // send the generated PDF
      echo $pdf;
skillup wrote on 2016-01-21:
This issue was fixed by adding this css:
img, td, th { page-break-inside: avoid }