<?php /** * Created by PhpStorm. * User: programador * Date: 16/05/2018 * Time: 09:26 AM */ if ( ! defined('BASEPATH')) exit('No direct script access allowed'); //INCLUIMOS EL ARCHIVO FPDF require_once APPPATH."/third_party/fpdf/fpdf.php"; //EXTENDEMOS LA CLASE PDF DE LA CLASE FPDF PARA QUE HEREDE TODAS SUS VARIABLES Y FUNCIONES class Pdf extends FPDF { public function __construct() { parent::__construct('P','mm','Letter'); } // EL ENCABEZADO DEL PDF public function Header() { parent::Header(); // TODO: Change the autogenerated stub // $this->Image('','100','50','50','50','PNG'); $this->SetFont('Arial', 'B', 15); $this->Cell(200, 10, utf8_decode('Instituto Tecnólogico Superior Progreso'), 0, 0, 'C'); $this->Ln(20); } // EL PIE DEL PDF public function Footer() { parent::Footer(); // TODO: Change the autogenerated stub $this->SetY(-15); $this->SetFont('Arial', 'I', 8); $this->Cell(0, 10, 'Pagina'.$this->PageNo().'/{nb}', 0, 0, 'C'); } }