udtræk fra mysql og opret pdf fil
hej har lavet dette lille script men kan ikke rigtig finde ud af hvoledes jeg for trukket image ud af mysql og lagt med ud på pdf filen for følgende fejl men dette eksempel.FPDF error: Image file has no extension and no type was specified: $recipe_image
***** scriptet *****
<?php
include ('useall.php');
if (!isset($recID))
$recID = "";
if ($size == "4x6")
$width = 80;
else
$width = 105;
$recipe_title = "";
$recipe_portioner = "";
$recipe_image = "";
$recipe_ingredients = "";
$recipe_method = "";
$recipe_note = "";
$q = "SELECT * FROM recipe WHERE recipeID = '$recID'";
mysql_first_data ($q, "recipe_title|recipe_image|recipe_portioner|recipe_ingredients|recipe_method|recipe_note");
$recipe_title = htmlreserve($recipe_title);
$recipe_image = htmlreserve($recipe_image);
$recipe_portioner = htmlreserve($recipe_portioner);
$recipe_ingredients = htmlreserve($recipe_ingredients);
$recipe_method = htmlreserve($recipe_method);
$recipe_note = htmlreserve($recipe_note);
define('FPDF_FONTPATH', 'font/');
require('mc_table_indeks.php');
$pdf=new PDF_MC_Table('P','mm',$size);
$pdf->AliasNbPages();
$pdf->Open();
$pdf->SetMargins(13,13,10);
//1st page
$pdf->AddPage();
$pdf->ln(1);
$pdf->SetFont('Arial', 'B', 11);
$pdf->MultiCell ($width, 5, $recipe_title,'0' ,'L');
//1st Billed
$pdf->ln(1);
$pdf->Image('$recipe_image');
//Portioner
$pdf->ln (5);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(114,56,56);
$pdf->Cell ($width, 5, "Antal Portioner");
$pdf->ln (5);
$pdf->SetFont('Arial', '', 6);
$pdf->SetTextColor(0);
$pdf->MultiCell ($width, 3, $recipe_portioner,'0' ,'L');
//Ingredients
$pdf->ln (5);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(114,56,56);
$pdf->Cell ($width, 5, "Ingredienser");
$pdf->ln (5);
$pdf->SetFont('Arial', '', 6);
$pdf->SetTextColor(0);
$pdf->MultiCell ($width, 3, $recipe_ingredients,'0' ,'L');
//Method
$pdf->ln (5);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(114,56,56);
$pdf->Cell ($width, 5, "Fremgangsmetode");
$pdf->ln (5);
$pdf->SetFont('Arial', '', 6);
$pdf->SetTextColor(0);
$pdf->MultiCell ($width, 3, $recipe_method,'0' ,'J');
//Note
if (!empty($recipe_note))
{
$pdf->ln (5);
$pdf->SetFont('Arial', '', 8);
$pdf->SetTextColor(114,56,56);
$pdf->Cell ($width, 5, "Note");
$pdf->ln (5);
$pdf->SetFont('Arial', '', 6);
$pdf->SetTextColor(0);
$pdf->MultiCell ($width, 3, $recipe_note,'0' ,'J');
}
$pdf->SetDisplayMode('real');
$pdf->SetTitle("$recipe_title");
$pdf->SetAuthor("domain.dk");
$pdf->SetCreator("Powered by domain - http://www.domain.dk");
$pdf->Output("recipe-$recID-$size.pdf", "I");
?>
