I find myself in the need to seek your help again. I am trying to make a PDF report. When changing the size of my sheet, it is not displayed, I have already moved the parameters and even if it does not allow me to display the header.
I share the code and an image, I am using the A4 orientation. I am using the FPDF library
<?php
require('../fpdf/fpdf.php');
class PDF extends FPDF
{
// Cabecera de página
function Header()
{
// Logo
$this->Image('../img/ENCAB_PAG.jpg',10,8,33);
// Arial bold 15
$this->SetFont('Arial','B',15);
// Movernos a la derecha
$this->Cell(80);
// Título
$this->Cell(30,10,utf8_decode('Lista de Reportes'),0,0,'C');
// Salto de línea
$this->Ln(20);
$this->Cell(30,10,'Nombres',0, 0, 'C', 0);
$this->Cell(75,10,'Direccion',0, 0,'C', 0);
$this->Cell(10,10,'Telefono',0, 0, 'C', 0);
$this->Cell(50,10,'No contrato', 0, 0,'C', 0);
$this->Cell(30,10,'Descripcion', 0, 0,'C', 0);
$this->Cell(30,10,'Fecha', 0, 0,'C', 0);
$this->Cell(30,10,'Cuadrilla', 0, 0,'C', 0);
$this->Cell(30,10,'Estados', 0, 1,'C', 0);
}
// Pie de página
function Footer()
{
// Posición: a 1,5 cm del final
$this->SetY(-15);
// Arial italic 8
$this->SetFont('Arial','I',8);
// Número de página
$this->Cell(0,10,utf8_decode('Page ').$this->PageNo().'/{nb}',0,0,'C');
}
}
According to the FPDF library documentation , you must instantiate the class where you override the Header and Footer methods. In this case according to the images you must instantiate the PDF class .
Here is the section in the documentation that describes the problem