Inserting Image from url in PDF using FPDF

Im using FPDF to make PDF file.
and I want to insert qr-code image to PDF file.

I made php file for make qr-code.In HTML it works.
<img src="sampleqr.php?url=" height="100" width="100">

How can i put this qr-code image to PDF, like this.
$pdf->Image('sampleqr.php?url=', $x, $y, 50.0);
it doesnt work.

Is it possible to do this easily NOT save file in local?
Who is Participating?
Ray PaseurCommented:
I think the easiest way to do this is to create the QR code and save the file locally.  Then create the PDF and insert the local file into the PDF.  After you've created the PDF you can delete the local QR code file.  The reason I recommend this (from experience) is that the Image() method does not seem able to accept the output of a script - it needs to be able to read a file directly from disk.  Files that are read from disk are not parsed through the PHP engine, so the PHP part of this process must come first and be completed before you can use the QR code file to make the PDF.
HFunakawaAuthor Commented:
Thanks for you comment that easy to understand why i have to save file.I will try.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.