Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/07/2004, 06:41
Avatar de carlosechelon
carlosechelon
 
Fecha de Ingreso: octubre-2003
Ubicación: campana.baires
Mensajes: 71
Antigüedad: 23 años
Puntos: 0
Exclamación Error en PDF con R&OS

hola chicos...........esoty utilizando esta libreria de impresion de pdfs...........pero resulta que cuando utilizo el script me aparece un CUADRO DE DIALOGO CON LA OPCION DE DOWNLOAD del Explorer..................En donde puedo estar errando?.........muchas gracias y salu2 a todos vsts.

Código PHP:
<?
    error_reporting
(E_ALL); 
    include(
'ezpdf/class.ezpdf.php');   
 
    
$pdf = & new Cezpdf('letter','landscape'); 
    
$pdf->selectFont('ezpdf/fonts/Courier'); 

    
$pdf->ezStartPageNumbers(500,18,10,'','Pagina : {PAGENUM} de {TOTALPAGENUM}',1); 

    
$fechs = date("d/m/y"); 
    
$all = $pdf->openObject(); 
    
$pdf->saveState(); 
    
$pdf->setStrokeColor(0,0,0,1); 
    
$pdf->line(20,30,750,30); 
    
$pdf->line(20,585,750,585); 
    
$pdf->addText(20,590,10,'Industrial Mexicana, SA de CV - Control de Contratos'); 
    
$pdf->addText(650,590,10,'Depto. Finanzas'); 
    
$pdf->addText(20,18,10,$fechs); 
    
$pdf->restoreState(); 
    
$pdf->closeObject(); 
    
$pdf->addObject($all,'all'); 


    
$link = mysql_connect("localhost", "killaton");
    
mysql_select_db("telefonos",$link);

  
    
$sql = "SELECT * FROM telefonos";
       
$data = array(); 
    
    
$result = mysql_query ($sql);
    
    
$cols = array('oficina'=>'Oficina/Dependencia', 
                  
'numero'=>'Teléfono', 
                  
'tipo_linea'=>'Interno/Externo'); 

        
                  

        while (
$row = mysql_fetch_row($result)) {
                
$col1 = $row[3];
                
$col2 = $row[2];
                
$col3 = $row[4];
                
                
$data[] = array('oficina'=>$col1, 
                                
'numero'=>$col2, 
                                
'tipo_linea'=>$col3);
                                
                                

        }
        
         
$data[] = array('oficina'=>'', 
                           
'numero'=>'', 
                           
'tipo_linea'=>'');

$pdf->ezTable($data,$cols,'',array('fontSize'=>6, 
'cols'=>array( 
                
'oficina'=>array('justification'=>'left') 
                ,
'numero'=>array('justification'=>'left') 
                ,
'tipo_linea'=>array('justification'=>'left')) 
));
        
if (isset(
$d) && $d){ 
    
$pdfcode = $pdf->ezOutput(); 
    
$pdfcode = str_replace('\n','\n<br>',htmlspecialchars($pdfcode)); 
    echo 
'<html><body>'; 
    echo 
trim($pdfcode); 
    echo 
'</body></html>'; 
} else { 
    
$pdf->ezStream(); 
} 
?>