javascript - TCPDF open links in new tab/window -


how open links in new tab/window in pdf document. tried target="_blank" did not work. found javascript solution on internet. how can use javascript in tcpdf.

i tried following:

$text = 'bla bla bla bla bla bla bla bla<br>'; $url = "http://google.com"; $links = ' <a href="javascript:open_win('.$url.');">click me</a>             <a href="'.$url.'" target="_blank">click me</a> ';  $output = $text.$links; $pdf->writehtml($output); 

but did not work.

use below method

<a href="javascript: w=window.open('yoursite.com/linktothepdf.pdf'); w.print(); w.close(); ">​​​​​​​​​​​​​​​​​print pdf</a> 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -