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.

Était-ce utile?

La 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 );

Autres conseils

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top