我以编程方式创建了PDF文件.为此,我使用了HTML到PDF转换库.在我的PDF中,有一些网站页面的链接.
我已按照以下方式实现了html,然后以编程方式将其转换为PDF.
<a target="_blank" href="http://mywebsite_url_here.html">Link</a>
Run Code Online (Sandbox Code Playgroud)
但是当打开这个PDF到chrome或firefox浏览器并点击PDF中存在的任何链接时.链接打开是相同的TAB而不是新的TAB.请帮助找出解决方案.这样我的PDF就会驻留在一个标签页中,链接将在浏览器的另一个标签页中打开.
我已经尝试过了
target="_blank"
target="_top"
<a onclick="window.open ('http://mywebsite_url_here.html', '');
return false" href="javascript:void(0);"></a>
Run Code Online (Sandbox Code Playgroud)
但没有什么对我有用.