include_once '../../../includes/services.php'; //==================================================================== // Set up parameters // // We need to set the filename for the template which we want to use // as the template for our generated PDF. // // In addition we supply the information which we want to write to the // document. This data would usually be sent as GET / POST or be stored // in session from the order confirmation page. //==================================================================== // the template PDF file $codigoContrato = isset($_GET['codigo']) ? $_GET['codigo'] : 0; $Mes = isset($_GET['mes']) ? $_GET['mes'] : 0; $servicios = new servicios(); $ObtenerCabeceraFacturacion = $servicios->ObtenerCabeceraFacturacion($codigoContrato, $Mes); $MesBoleta = $servicios->obtenerUltimoDiaMesActual($ObtenerCabeceraFacturacion[0]['mes']); $fechaEmision = date_create($ObtenerCabeceraFacturacion[0]['fechaEmision']); $fechaVencimiento = date_create($ObtenerCabeceraFacturacion[0]['fechaVencimiento']); //var_dump($ObtenerCabeceraFacturacion[0]['nombreCliente']);exit; $filename = "document.pdf"; //-------------------cabecera------------------------------ //==================================================================== // Set up the PDF objects and initialize // This section sets up FPDF and imports our template document. No need // for changes in this section. //==================================================================== $pdf = new FPDI(); $pdf->AddPage(); // import the template PFD $pdf->setSourceFile($filename);