Ver Mensaje Individual
  #7 (permalink)  
Antiguo 30/11/2011, 16:29
Avatar de molig
molig
 
Fecha de Ingreso: septiembre-2006
Ubicación: Acapulco
Mensajes: 50
Antigüedad: 17 años, 7 meses
Puntos: 15
Exclamación Respuesta: dompdf y peridad de datos

hernanchu prueba utilizando la librería TCPDF (http://www.tcpdf.org), me funciona bastante bien, no tienes que estarte peleando con el ob_start(), agregas a una variable tu código html y después lo mandas cargar con la librería.

un ejemplo
Código PHP:
session_start();
require_once(
'./tcpdf/tcpdf.php');

$pdf = new MYPDF('L'PDF_UNITPDF_PAGE_FORMATtrue'UTF-8'false);
$pdf->SetCreator(PDF_CREATOR);

$pdf->SetTitle('Mi Directorio');
$pdf->SetFont('helvetica'''8);
$pdf->AddPage();
$html='<div>mi c&oacute;digo html</div>
<table>
<tr><td>Hola mundo</td></tr>
</table>'
;
$pdf->writeHTML($htmltruefalsetruefalse'');
$pdf->lastPage();
$pdf->Output("Directorio_OfCentral.pdf","I"); 
__________________
He aprendido que un hombre
sólo tiene derecho a mirar a otro hacia abajo,
cuando ha de ayudarle a levantarse.
GGM