Jay Solanki
Jay Solanki

Reputation: 13

tcpdf prevent page break within a html table block

Is there any way to prevent this table break in row

I want to start new row in new page rather than current page.

Upvotes: 1

Views: 2883

Answers (2)

Lalatak Matebian
Lalatak Matebian

Reputation: 61

A trick from @Justin R. from this forum, add this code to every tr...

<tr nobr="true">
    <td> your contents here...</td>
</tr>

Upvotes: 3

AamirR
AamirR

Reputation: 12198

I had a similar issue in an old project, and I am setting AutoPageBreak=false and within for-loop I check if the increment has reached a particular value, then I close the table and after addPage() continue with a new table.

Its not elegant but works in my case, hope it helps!

Upvotes: 1

Related Questions