tecnickcom / TCPDF

Official clone of PHP library to generate PDF documents and barcodes
https://tcpdf.org
Other
4.22k stars 1.52k forks source link

HTML table with split row + image: malformed PDF, Adobe Acrobat reader crashes #535

Open eugenio11 opened 2 years ago

eugenio11 commented 2 years ago

Hello, here is an example, it's a table on two pages with headings (TH); first page is fine, however the last row of the first page has a tall cell that needs to be split over two pages, it contains an image and that's the first thing in the following new page. Adobe Acrobat reader shows an (almost) blank page and sometimes also displays an error. It doesn't happens with MacOS preview or in Chrome.

This is the first page, works well on Acrobat Reader, Preview and Chrome Schermata 2022-07-02 alle 16 08 22

Here you can see how the second page renders in Preview and in Chrome:

Schermata 2022-07-02 alle 14 39 04

Here the second page Acrobat Reader:

Schermata 2022-07-02 alle 14 38 55

Here is the code (you can use any 20x20 px image instead of that blue square).

If I add an additional <br> before the image, the problem disappears.

Could you please help?

Thanks.

<?php
$html_to_convert = '
<!DOCTYPE html>
<html  lang="en">
<head>
<title>test</title>
<meta  charset="utf-8">
<style>

tr {
    page-break-inside: avoid;
}
tr{
  font-size: 9px;
}

th{
font-weight: bold;
background-color:#fad71f;
border-bottom:1px solid #f2f2f2;
border-right:1px solid #f2f2f2;
font-size: 10px;
}

td{
    page-break-inside: avoid;
    border-bottom:0.2em solid #c1c1c1;
    border-right:0.2em solid #c1c1c1;
}

td.evidenza {
    font-weight:bold;
    background-color:#f2f2f2;
}

th.very_long_data {
  width: 130px;
}
th.long_data {
  width: 80px;
}
th.short_data {
  width: 41px;
}
th.days{
  width: 25px;
}

td.very_long_data {
  width: 130px;
}
td.long_data {
  width: 80px;
}
td.short_data {
  width: 41px;
}
td.days{
  width: 25px;
}
</style>
</head>
<body>
   <table cellpadding="5" cellspacing="0" border="0">
    <thead>
    <tr valign="top" >
      <th colspan="21">giorno</th>
      </tr>
      <tr valign="top" >
        <th class="long_data">Immm. ejebtirpce</th>
        <th class="long_data"></th>
        <th class="long_data"></th>
        <th class="short_data">Orario </th>
        <th class="long_data">Luogo </th>
        <th class="short_data"></th>
        <th class="long_data"></th>
        <th class="short_data"></th>
        <th class="short_data"></th>
        <th class="short_data"></th>
        <th class="short_data"></th>
        <th class="long_data"></th>
        <th class="short_data"></th>
        <th class="long_data"></th>
        <th class="days"></th>
        <th class="days"></th>
        <th class="days"></th>
        <th class="days"></th>
        <th class="days"></th>
        <th class="days"></th>
        <th class="days"></th>
      </tr>
     </thead>   
     <tbody>    

<tr  >
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">Rafjsakdfjsd fjsdlaf jsldafjkaslklfjsdlfjasldkWv</td>
<td class="short_data"></td>
<td class="long_data">.</td>

<td class="short_data"></td>
<td class="long_data">ctnzjuytrfgt ctnzjuytrfg ctnz ZTT\CCC C.V.</td>

<td class="short_data">no</td>
<td class="short_data">sì</td>
<td class="short_data"></td>
<td class="short_data"></td>

<td class="long_data">Auto<br/>Auto<br/>Auto Auto</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="days">2</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>

</tr>

<tr  >
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">Rafjsakdfjsd fjsdlaf jsldafjkaslklfjsdlfjasldkWv</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="short_data"></td>
<td class="long_data">ctnzjuytrfgt ctnzjuytrfg ctnz ZTT\CCC C.V.</td>

<td class="short_data">no</td>
<td class="short_data">sì</td>
<td class="short_data"></td>
<td class="short_data"></td>

<td class="long_data">Auto<br/>Auto<br/>Auto Auto</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="days">2</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>

</tr>

<tr  >
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">Rafjsakdfjsd fjsdlaf jsldafjkaslklfjsdlfjasldkWv</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="short_data"></td>
<td class="long_data">ctnzjuytrfgt ctnzjuytrfg ctnz ZTT\CCC C.V.</td>

<td class="short_data">no</td>
<td class="short_data">sì</td>
<td class="short_data"></td>
<td class="short_data"></td>

<td class="long_data">Auto<br/>Auto<br/>Auto Auto</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="days">2</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>

</tr>

<tr  >
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">Rafjsakdfjsd fjsdlaf jsldafjkaslklfjsdlfjasldkWv</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="short_data"></td>
<td class="long_data">ctnzjuytrfgt ctnzjuytrfg ctnz ZTT\CCC C.V.</td>

<td class="short_data">no</td>
<td class="short_data">sì</td>
<td class="short_data"></td>
<td class="short_data"></td>

<td class="long_data">Auto<br/>Auto<br/>Auto Auto</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="days">2</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>

</tr>

<tr  >
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">Rafjsakdfjsd fjsdlaf jsldafjkaslklfjsdlfjasldkWv</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="short_data"></td>
<td class="long_data">ctnzjuytrfgt ctnzjuytrfg ctnz ZTT\CCC C.V.</td>

<td class="short_data">no</td>
<td class="short_data">sì</td>
<td class="short_data"></td>
<td class="short_data"></td>

<td class="long_data">Auto<br/>Auto<br/>Auto Auto</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="days">2</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>

</tr>

<tr  >
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">Rafjsakdfjsd fjsdlaf jsldafjkaslklfjsdlfjasldkWv</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="short_data"></td>
<td class="long_data">ctnzjuytrfgt ctnzjuytrfg ctnz ZTT\CCC C.V.</td>

<td class="short_data">no</td>
<td class="short_data">sì</td>
<td class="short_data"></td>
<td class="short_data"></td>

<td class="long_data">Auto<br/>Auto<br/>Auto Auto</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="days">2</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>

</tr>

<tr  >
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">Rafjsakdfjsd fjsdlaf jsldafjkaslklfjsdlfjasldkWv</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="short_data"></td>
<td class="long_data">Assiuytbna\juopliga iunyiggy x ZZZ raxxel<br> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAK1GlDQ1BJQ0MgUHJvZmlsZQAASImVlwdUE+kWgP+Z9EZJIAJSQm+CdAJICaGFIkgHUQlJIKHEmBBE7MjiCq4FERGwoYsgCq4uRdaCWLCwKDbsG2RRUJ+LBRsqb4BH2N133nvn3Zx/7nfu3P+WmfnPuQGA4seVSDJhNQCyxNnSyEBfRnxCIgP3FOAABNSBKaBzeTIJKyIiFCAypf8q7+8gvojctBmP9e/3/6tQ+QIZDwAoCeEUvoyXhXA7sgZ5Emk2AKhaxG68NFsyzl0Ia0iRAhFWjHPaJL8b55QJRuMnfKIj2QjrAoAnc7nSNADIFoidkcNLQ+KQgxC2E/NFYoRzEfbiCbl8hFsRnpWVtXicf0fYAvGXAEAhI8xM+VPMtL/ET1HG53LTlDzZ14Tg/UQySS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jcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KSlRgvAAAAC1JREFUOBFjDGvY/J+BioCJimaBjRo1kPIQHQ3D0TAkIwRGkw0ZgYamZQSGIQCDCQKwjqQ3dQAAAABJRU5ErkJggg==" width="20" height="20" >  </td>

<td class="short_data">no</td>
<td class="short_data">sì</td>
<td class="short_data"></td>
<td class="short_data"></td>

<td class="long_data">Auto<br/>Auto<br/>Auto Auto</td>
<td class="short_data"></td>
<td class="long_data">.</td>

<td class="days">3</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>

</tr>

<tr  >
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">Rafjsakdfjsd fjsdlaf jsldafjkaslklfjsdlfjasldkWv</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="short_data"></td>
<td class="long_data">Assiuytbna\juopliga iunyiggy x ZZZ raxxel  <br> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAK1GlDQ1BJQ0MgUHJvZmlsZQAASImVlwdUE+kWgP+Z9EZJIAJSQm+CdAJICaGFIkgHUQlJIKHEmBBE7MjiCq4FERGwoYsgCq4uRdaCWLCwKDbsG2RRUJ+LBRsqb4BH2N133nvn3Zx/7nfu3P+WmfnPuQGA4seVSDJhNQCyxNnSyEBfRnxCIgP3FOAABNSBKaBzeTIJKyIiFCAypf8q7+8gvojctBmP9e/3/6tQ+QIZDwAoCeEUvoyXhXA7sgZ5Emk2AKhaxG68NFsyzl0Ia0iRAhFWjHPaJL8b55QJRuMnfKIj2QjrAoAnc7nSNADIFoidkcNLQ+KQgxC2E/NFYoRzEfbiCbl8hFsRnpWVtXicf0fYAvGXAEAhI8xM+VPMtL/ET1HG53LTlDzZ14Tg/UQySSZ32f/5aP63ZGXKp3KYIYsslAZFIhp5m9DdjMUhShanzA2fYh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T4KSlRgvAAAAC1JREFUOBFjDGvY/J+BioCJimaBjRo1kPIQHQ3D0TAkIwRGkw0ZgYamZQSGIQCDCQKwjqQ3dQAAAABJRU5ErkJggg==" width="20" height="20" >  </td>

<td class="short_data">no</td>
<td class="short_data">sì</td>
<td class="short_data"></td>
<td class="short_data"></td>

<td class="long_data">Auto<br/>Auto<br/>Auto Auto</td>
<td class="short_data"></td>
<td class="long_data">.</td>

<td class="days">3</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>

</tr>

<tr  >
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">Rafjsakdfjsd fjsdlaf jsldafjkaslklfjsdlfjasldkWv</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="short_data">0 20</td>
<td class="long_data">assitenza-test test test <br>  </td>

<td class="short_data">no</td>
<td class="short_data">sì</td>
<td class="short_data"></td>
<td class="short_data"></td>

<td class="long_data">Auto<br/>Auto<br/>Auto Auto</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="days">3</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>

</tr>

<tr  >
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">tttt</td>
<td class="long_data evidenza">Rafjsakdfjsd fjsdlaf jsldafjkaslklfjsdlfjasldkWv</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="short_data">0 15</td>
<td class="long_data">assitenza-test test test<br>   </td>

<td class="short_data">no</td>
<td class="short_data">sì</td>
<td class="short_data"></td>
<td class="short_data"></td>

<td class="long_data">Auto<br/>Auto<br/>Auto Auto</td>
<td class="short_data"></td>
<td class="long_data"></td>

<td class="days">3</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>
<td class="days">0</td>

</tr>
</tbody>    
</table>
</body>
</html>';

require ('tcpdf.php');
$pdf = new TCPDF('L', PDF_UNIT, 'A4', true, 'UTF-8', false);
$pdf->AddPage();
$pdf->writeHTML($html_to_convert, true, false, true, false, '');                      
$pdf->Output('test.pdf', 'I');
 exit();
</code>