// Create a fixed link to the first page using the * character $index_link = $pdf->AddLink(); $pdf->SetLink($index_link, 0, '*1'); $pdf->Cell(0, 10, 'Link to INDEX', 0, 1, 'R', false, $index_link);
http://www.tcpdf.org/examples/example_045.phps
update - refer to this addHtmlLink () function in the tcpdf library. You can add an internal link through
$pdf->addHtmlLink('#'.$index_link, 'hello');
where 'hello' begins the binding name and the first parameter is the link identifier.
In your case
$pdf->addHtmlLink('#'.$link, 'Whatever you like to name it'); $html = '<a href="#'.$link.'" style="color:blue;">link name</a>'; $pdf->writeHTML($html, true, false, true, false, '');
source share