Question

What is the easiest way to get images from the fileserver into a pdf with fpdf? In my database I stored only the image URLs but I need to get the actual file.

Was it helpful?

Solution

Set your variable:

$image1 = "img/products/image1.jpg";

U can simply create a new string and add the extension

Then ceate a cell, position it. $this->Cell( 40, 40, $pdf->Image($image1, $pdf->GetX(), $pdf->GetY(), 33.78), 0, 0, 'L', false );

OTHER TIPS

Great question, I've also been having trouble with this and tried different things, like URL2FILE. My final method I used I will post above here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top