Hola estube un largo largo largo...... rato mirando como hacer funcionar 
Dom pfd con cake php y pues la forma mas rápida y sin fallas es pensarlo en 
la vista es decir
desde el controlador podemos setea información pero lo que en realidad lo 
que se convierte a pdf es la vista mi solución rápida es :

1. Colocar Don pdf en la carpeta vendors
2. usar en la vista que quieres convertir a pdf de la siguiente manera y 
listo

*Vista:*
*
*
*
<?php App::import("Vendor", "dompdf", array("file" => 
"dompdf/dompdf_config.inc.php"));
ob_start(); ?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>

<b>Este es html normal</b>
</body>
</html>
<?php
$dompdf = new DOMPDF();
    $dompdf->load_html(ob_get_clean());
    $dompdf->render();
    $pdf = $dompdf->output();
    $filename = "Nombredelpdf.pdf";
    file_put_contents($filename, $pdf);
    $dompdf->stream($filename);
?>
*


y listo si hay tildes recuerden usar el utf8_decode 

Espero le sirva y recuerden que esto es de parte de lavista

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to