samu_ham
Messages postés19Date d'inscriptionmardi 6 avril 2004StatutMembreDernière intervention12 janvier 2019
-
Modifié par jordane45 le 5/03/2014 à 00:33
jordane45
Messages postés38138Date d'inscriptionmercredi 22 octobre 2003StatutModérateurDernière intervention17 avril 2024
-
5 mars 2014 à 00:32
bonjour tt le monde
je cherche comment ouvrir un fichier pdf ,jai crée un pdf mais sa marche pas
jai la page download.php
<?php
if(isset($_GET['id'])) {
$id = intval($_GET['id']);
include("connexion.php");
$req = "SELECT * FROM procedure1 WHERE id = ".$id;
$ret = mysql_query($req) or die(mysql_error());
$col = mysql_fetch_row($ret);
if(!$col[0]){
echo "Id d'image inconnu";
}
else {
// your dompdf setup
$dompdf = new DOMPDF();
// add the header
$canvas = $dompdf->get_canvas();
$font = Font_Metrics::get_font("helvetica", "bold");
// the same call as in my previous example
$canvas->page_text(72, 18, "Header: {PAGE_NUM} of {PAGE_COUNT}",
$font, 6, array(0,0,0));
$dompdf->load_html($html);
echo $col[3];
}
else
{
echo "Mauvais id d'image";
}
?>