problem generating pdf with fpdf

0

My problem is this:

I have a form with which I select some data that I import from a MYSQL database, when I give it the save button it must open a new window where the pdf should be generated, the problem is that when I hit the save button I open the window in balnco, I do not bounce any error, I do not appear messages or anything like I have the following code but I do not see any problem and for more that I have looked for a solution I can not help it please.

<?php

    ini_set ('error_reporting', E_ALL);
    session_start();
    require('../fpdf/fpdf.php');
    require('guardar_cot.php');

    class PDF extends FPDF {

        function Header(){
            // Logo
            //$this->Image('logo.png',10,8, 26,33);
            // Arial bold 15
            $this->SetFont('Arial','B',15);
            // Movernos a la derecha
            $this->Cell(80);
            // Título
            $this->Cell(30,10,'Title',1,0,'C');
            // Salto de línea
            $this->Ln(40);
        }
        // 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,'Page '.$this->PageNo().'/{nb}',0,1,'C');
        }
    }

    $pdf=new PDF('P','mm','Letter');
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->SetFont('Arial','B',16);
    $nCot=$_SESSION['noCot'];
    $pdf->Cell(0,10,utf8_decode('Cotización No.')." ".$nCot,0,1,'R');
    $align=0;
        if ($align%2==0){
    for($i=1;$i<=40;$i++){
            $pdf->Cell(0,10,utf8_decode('Imprimiendo línea número ').$i,0,0);}}
        elseif ($align%2!=0) {
            $pdf->Cell(0,10,utf8_decode('hola').$i,0,2);
        }
        $align++;

    $pdf->Output();
?>
    
asked by Demian camilo 18.06.2018 в 23:51
source

0 answers