如何在TCPDF中将数据库表拆分为页面

I am making a small PDF generation tool for my client. I am using TCPDF because the we need arabic font to be used in it. I am getting result from database. Now client requirement is 20 result per page. I searched alot on internet. But there is nothing much I found. Here is my code please have a look.

$pdf->SetFont('dejavusans', '', 18);
$pdf->Ln(40);
$content = '';

$content .='
<table>
';

$counter=0;
$result = mysqli_query($db,"SELECT * FROM record");
while($row = mysqli_fetch_array($result))
{
    $counter++;

    $name = $row['rname'];
        $country = $row['rcountry'];
        $uid = $row['ruid'];

        $content .='

        <tr>
            <td>'.$name.'</td>
            <td>'.$country.'</td>
            <td>'.$uid.'</td>
        </tr>';
}

$content .='</table>';

$pdf->WriteHTML($content, true, 0, true, 0);

I tried following solution also but its not showing any result Split Table After X Number of Rows & Add Text in While Loop (Using TCPDF)