Click to See Complete Forum and Search --> : Help adding a Link to images $this->Image


Commodore64
04-15-2009, 09:01 AM
Hi,

Would someone be so kind as to show how i can add a link to the images below within the code? This is part of a file which generates a PDF document. I've managed to add my own images by duplicating code associated with other images in the same document, but i want the images to be hyperlinked to a URL within the PDF file also. Sorry, new to this stuff.

$this->Image(IMAGES_PATH.'image_1.png', 10, 230, 93.6, 13.6);
$this->Image(IMAGES_PATH.'image_2.png', 106, 230, 93.6, 13.6);


Regards:)

abou.hmed
04-15-2009, 09:35 AM
try this
$link=$this->AddLink();
$this->SetLink($link);
$this->Image(IMAGES_PATH.'image_1.png', 10, 230, 93.6, 13.6,'www.yourlink.com');

Commodore64
04-16-2009, 10:29 AM
Hi abou.hmed

Thanks for your reply and help.

I tried the code and I keep getting the error below.

FPDF error: Unsupported image type: www.yourlink.com

Cheers