Pergunta

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.

Foi útil?

Solução

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

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top