I use FPDF to create a PDF from database data. I need to put an image at the end but it is unsupported.
I get image from a php file that generate the image from a code in this way:
http://server/ean13.php?code=1234567890123
Usually I put this URL in <img>
tag but it doesn’t work with FPDF.
This is the code:
$pdf = new PDF(); //PDF Class extends FPDF
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','',12);
$pdf->Cell(0,10,'Test line',0,1);
$pdf->Image('ean13.php?code=1234567890123',10,6,30); //not work
$pdf->Output();
In ean13.php the image is generated by imagepng()
function to display the barcode.
I've also tried with file_get_contents
but is the same.
Just to add an other example, if in a page I put <img src="ean13.php?code=1234567890123" />
it works