I have created the PDF file programmatically. For this, I have used the HTML to PDF converting library. In my PDF there are some links for some pages of website.
I have implemented the html by following way and then converted it to PDF programmatically.
<a target="_blank" href="http://mywebsite_url_here.html">Link</a>
But when opening this PDF into chrome or firefox browser and clicking on the any link exist in PDF. Links are opening is same TAB instead of the new TAB. Please help to find out the solution for this. so that my PDF reside in one tab and link will open in another tab in browser.
I have already tried
target="_blank"
target="_top"
<a onclick="window.open ('http://mywebsite_url_here.html', '');
return false" href="javascript:void(0);"></a>
But nothing has worked for me.
2
Answers
Could you try #toolbar=0&view=fitH
or
Standard browser behaviour so don’t think you are going to get an answer. 🙂
WHY ? Well the links in a pdf to a URL can simply be plain text like if I write
Open link in new tab of browser from PDF file which I converted from HTML
It will take you to ….
YES this page.
ANSWER right click and open in new window !! or Right Click open in new tab.
The best hack I can do will use the PDF to open the same tab as blank thus not really answer your question, but for WHY?