FPDF Adding page to more

1

My document only came up one record, but it still generates two pages the function I am using is this:

function Footer(){ // CRIANDO UM RODAPE

    //$this->SetX(15);
    $this->setY(-15);
    //$this->Rect(10,270,190,20);
    $this->SetFont('Arial','',10);        

    $this->SetFont('Arial','',7);
    $this->Cell(20,7,utf8_decode('Página '.$this->PageNo().' de {nb}'),0,0,'L');
    setlocale(LC_ALL, 'pt_BR', 'pt_BR.utf-8', 'pt_BR.utf-8', 'portuguese');
    date_default_timezone_set('America/Manaus');
    $dia_hoje = date('d');
    $ano_hoje = date('Y');
    $hora_hoje = date('H:i:s');
    $data =  'Manaus, '.ucfirst(gmstrftime('%A')).', '.$dia_hoje.' de '.ucfirst(gmstrftime('%B')).' '.$ano_hoje.' '.$hora_hoje;
    //echo $data;
    $this->SetX(-70);
    $this->Cell(60,7,$data,0,0,'R');

}

If I leave the footer well above type setY (-30) then it does not generate the second page I count on your help

    
asked by anonymous 16.09.2016 / 16:25

1 answer

0

I discovered the error.

In fact it was in my detail that I was doing bullshit

$i = 0;
while ($agendaList->hasNextAgenda()){
  $i++;
  if($agenda_str == 'S'){
 ...

It was adding many pages when it was multiple items

    
20.09.2016 / 00:09