문제

I'm adding the following to my MPDF footer:

<a href="#bottom"><img src="arrowdownred.jpg" width="40" height = "34" />&darr;</a>

It's showing up fine, and the ↓ character works fine as a link, but the image doesn't!

The cursor changes when I mouse over it, but it doesn't work when clicked.

Anyone got any ideas?

도움이 되었습니까?

해결책

So I found the answer deep in the MPDF forum, so I thought I'd post it up here: It's a bug with image links to fix it, in mpdf.php, line 18330, find:

 if ($this->HREF) { $objattr['link'] = $this->HREF; }    // ? this isn't used

and replace with:

 if ($this->HREF) {
 if (strpos($this->HREF,".") === false && strpos($this->HREF,"@") !== 0) {
 $href = $this->HREF;
 while(array_key_exists($href,$this->internallink)) $href="#".$href;
 $this->internallink[$href] = $this->AddLink();
 $objattr['link'] = $this->internallink[$href];
 }
 else { $objattr['link'] = $this->HREF; }
 }
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top