[PDF] Utilisation de HTML2PDF pour convertir une page php en PDF
Bonjour,
J'essaye de convertir une page php qui affiche un tableau (assez complexe) en un fichier PDF.
Pour cela, j'utilise HTML2PDF, mais je rencontre une erreur que je n'arrive pas à résoudre.
Voilà mon fichier pdf.php qui est sensé convertir la page ver_resultados.php en PDF :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
<?php
ob_start();
include(dirname(__FILE__).'/ver_resultados.php');
$content = ob_get_clean();
// convert in PDF
require_once(dirname(__FILE__).'/html2pdf.class.php');
try
{
$html2pdf = new HTML2PDF('P', 'A4', 'en', true, 'UTF-8', array(15, 5, 15, 5));
$html2pdf->setDefaultFont("dejavusans");
$html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output('resultados.pdf');
}
catch(HTML2PDF_exception $e) {
echo $e;
exit;
}
?> |
J'obtiens l'erruer suivante :
Citation:
ERROR n°6
File : C:\Program Files (x86)\EasyPHP-12.1\www\hotusa\html2pdf.class.php
Line : 1319
Impossible to load the image
Quelqu'un pourrait-il m'éclairer ?? Merci =)