使用php的tcpdf额外空白页面

I am using TCPDF to convert a page generated by php. In this I am using pagebreak="true" for page breaking when reached limit. so I got one extra blank page with title when the limit reached. how to remove this blank page?

tcpdf();
$obj_pdf = new TCPDF('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
$obj_pdf->SetCreator(PDF_CREATOR);
$title = "Salary slip";
$obj_pdf->SetTitle($title);
$obj_pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, $title, PDF_HEADER_STRING);
$obj_pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$obj_pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$obj_pdf->SetDefaultMonospacedFont('helvetica');
$obj_pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$obj_pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
$obj_pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$obj_pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
$obj_pdf->SetFont('helvetica', '', 9);
$obj_pdf->setFontSubsetting(false);
$obj_pdf->AddPage();
ob_start();
//$content = ob_get_contents();
$content = $this->load->view('templates/template',$data,true);
ob_end_clean();
$obj_pdf->writeHTML($content, true, false, true, false, '');
$obj_pdf->Output('pay_slip.pdf', 'I');

and in template

<?php $limit=1; foreach($salaries['salaries'] as $key =>$salary):?>
<?php   $limit+=$key;
        $limit1=$limit%4;


        if($limit1==0){
          ?><br pagebreak="true"/><?php

        }

Try using

.element:last-child {page-break-after:auto;}

Where 'element' is your CSS selector.