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.

有帮助吗?

解决方案

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

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top