Path

ez projects / paradoxpdf / forum / suggestions / correction of links in the...


Correction of links in the TOC to pages in the PDF

You need to be logged in to post messages in the forums. New users may register here.

Frédéric Lopez

Member since:
19 February 2013

Posts: 3

Tuesday 19 February 2013 12:43:19 pm

I tried to add "a href" links in the TOC to "a name" pages in the PDF, but it didn't work because "#number" anchors were always replaced by "http://myservername/#number".

To prevent this I've modified the paradoxpdf.php, where I removed the "a" in the regexp of the fixURL function :

$htmlfixed = preg_replace('#(<\s*(a|img|link)\s+[^>]*(href|src)\s*=\s*["\'])/?([^:"\'>]*)(["\'])#i', '$1'.$base_url.'/$4$5', $html);

->

$htmlfixed = preg_replace('#(<\s*(img|link)\s+[^>]*(href|src)\s*=\s*["\'])/?([^:"\'>]*)(["\'])#i', '$1'.$base_url.'/$4$5', $html);

It would be nice if you could update your library with this modification.

Thanks.
Up

Karnichi Mohamed

Member since:
09 October 2006

Posts: 78

Saturday 02 March 2013 7:33:04 pm

Hi Frédiric,

Thanks for your feedback, i have updated source code.

Thanks

http://www.amiralweb.com Certified eZPublish Expert

Up

You need to be logged in to post messages in the forums. New users may register here.