How to open links in new tab/window which is in pdf document. I tried target="_blank"
but it did not work. I was found javascript
solution on the internet. But how I can use javascript
in tcpdf.
I tried the following:
$text = 'bla bla bla bla bla bla bla bla<br>';
$url = "";
$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 it did not work.
How to open links in new tab/window which is in pdf document. I tried target="_blank"
but it did not work. I was found javascript
solution on the internet. But how I can use javascript
in tcpdf.
I tried the following:
$text = 'bla bla bla bla bla bla bla bla<br>';
$url = "http://google.";
$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 it did not work.
$text = 'bla bla bla bla bla bla bla bla<br>';
$url = "http://google.";
$links = ' <a href="javascript:open_win('.$url.');">Click me</a> <a href="'.$url.'" target="_blank">Click me</a> ';
$output = $text.$links;
$pdf->writeHTML($output);
– Yasin Yörük
Commented
Apr 1, 2013 at 11:57
javascript
and target="_blank"
– Yasin Yörük
Commented
Apr 1, 2013 at 12:00
use the below method
<a href="javascript: w=window.open('yoursite./LinkToThePDF.pdf'); w.print(); w.close(); ">print pdf</a>
you can open a the pdf by adding a target="_blank" in your form method
<form method="post" target="_blank">
...
</form>
In short it is not possible here is SO answer that clarifies.
https://stackoverflow./a/39763562/1695062