Ver Mensaje Individual
  #5 (permalink)  
Antiguo 31/05/2006, 13:06
Anita Rubio
 
Fecha de Ingreso: septiembre-2005
Mensajes: 141
Antigüedad: 18 años, 7 meses
Puntos: 0
FINALMENTE EL ARCHIVO PARA CREAR EL PDF

Código PHP:
<?php
require_once('../Connections/PAGINA.php'); 

error_reporting(E_ALL);
include(
'../class.ezpdf.php');

$pdf =& new Cezpdf($paper='LETTER');
$pdf->selectFont('../fonts/Times-Roman.afm');
$pdf->setEncryption("","",array('print'));
$pdf->addJpegFromFile("../imagenes/logo.jpg",30,650,100,80);
$pdf->ezText("\n\n".'<b>DEPORTES</b>',23,array('justification'=>'center'));
$pdf->ezText("\n\n\n\n\n".'<b>Comprobante Inscripción por Internet</b>',12,array('justification'=>'center'));  

  
//Esta parte esta comentada xq es la que me causa error, me dice:"El archivo no empieza por '%PDF-' "

  /*$nombre=$_POST['user'];
  $id=$_POST['nsocio'];
  $nom_alum=$_POST['nomb'];
  $apellido=$_POST['apell'];
  $discip=$_POST['clase'];
  $categ=$_POST['subclase'];
  $horario=$_POST['hrario'];
  $periodo=$_POST['period'];/**/


$alumno=$nomb." ".$apell;

$pdf->rectangle(20,598,550,20);
$pdf->addText(90,550,11,"Nombre : ");
$pdf->addText(160,550,11,$alumno);
$pdf->addText(90,520,11,"Disciplina: ");
$pdf->addText(160,520,11,$clase);
$pdf->addText(90,490,11,"Categoria: ");
$pdf->addText(160,490,11,$subclase);
$pdf->addText(90,460,11,"Horario : ");
$pdf->addText(160,460,11,$hrario);
$pdf->addText(90,430,11,"Periodo : ");
$pdf->addText(160,430,11,$period);


if (isset(
$d) && $d){
$pdfcode $pdf->output(1);
$pdfcode str_replace("\n","\n<br>",htmlspecialchars($pdfcode));
echo 
'<html><body>';
echo 
trim($pdfcode);
echo 
'</body></html>';
} else {
$pdf->stream();
}
?>
__________________
:ojotes: A n I t A :ojotes: