display image from url (stored as path in database) in pdf report

we have image stored as path in database and want to display it in pdf report, please help
i had tried sc_pdf_image($cell_activitysnap,10,10,100,200,‘jpg’); but nothing is printing
$cell_activitysnap contain full image path (http://xxxxx.com/imagesMechQuiz/MQ_20160502_113124.jpg)

I also need an image in a PDF report.

code:
$filex = “http:/web.com/_lib/file/img/image.png”;
$LOGOX = file_get_contents($filex);
echo ‘<img src="data:image/png;base64,’ . base64_encode($LOGOX) . ‘" />’;
{LOGO} = ‘<img src="data:image/png;base64,’.base64_encode($LOGOX).’" />’;
echo ({LOGO});


The {LOGO} field is type image file name

Debugging the app I can see the image but no in the pdf report.

any idea?

Hello huzefid.
I noticed that when I’m using a variable as the path parameter to “sc_pdf_image”, there is an issue with the slashes or backslashes.
What I did is I left the lib part and added the image name. See below:
$fileName = … coming from anywhere you want … ;
sc_pdf_image(’…/_lib/img/’ . $fileName,10,10,100,200,‘jpg’);
Thisworks fine.
Hope it helps.