Reputation: 375
In my app the PDF gets opened in the web page and in the below example, when the users clicks on Logo.png it's getting redirected to FPDF site in the same page, but i want to open the link in the new window, instead of opening in the same window, so the users has the PDF opened.
$pdf->Image('logo.png',10,10,30,0,'','http://www.fpdf.org');
Upvotes: 3
Views: 1275
Reputation: 21
Yes I have tried some workarounds for this but its seem to not possible currently. But I have achieved this using ViewerJS.
Just display pdf using viewerjs(pdf js). Just put this line $('a').attr('target', '_blank');
after div.setAttribute('data-loaded', true);
inside viewer.js
file.
And you will find target blank. Hope this helps!
Upvotes: 2