Mpdf addpage one record per page

0

I need to generate a record per page of a mysql query using the MPDF library in PHP I started to write a code:

<?php
include("../controlador/mpdf60/mpdf.php");
include_once("../modelo/dao/conexao.php");
//include(MPDP_PATH.'mpdf.php');
$mpdf=new mPDF('pt','A6');
$mpdf->StartProgressBarOutput(2);
$mpdf->SetDisplayMode('fullpage'); 
$consulta="SELECT * FROM cliente";
$querys= mysqli_query($conn,"SELECT * FROM cliente");
$valida=mysqli_num_rows($querys);
while ($valida > '0')
{       
$html ="testeee";
if( $valida > 1){
$mpdf->WriteHTML($html);
$mpdf->AddPage();
}}
$arquivo =teste;
$mpdf->Output($arquivo.".pdf",'D');
unlink($filename);

exit;

?>
    
asked by anonymous 26.07.2018 / 04:33

0 answers