spipu / html2pdf

OFFICIAL PROJECT | HTML to PDF converter written in PHP
http://html2pdf.fr/en/default
Open Software License 3.0
1.68k stars 751 forks source link

HTML <a target="_blank" href=***> open in the same tab and replace pdf #692

Open SarahTrees opened 2 years ago

SarahTrees commented 2 years ago

In my HTML, there are many links, e.g. <a target="_blank" href="https://google.com">text link</a>.

When I create a PDF from this with html2pdf, these links are seen correctly and when I click on them, they also open the correct target.

However, just like with a web page, I want the target to open in a new tab/window and not replace the current PDF in the current tab/window. That is why I use target="_blank" in the HTML.

How do I get this behaviour to work in the PDF as well?

Someone already asked this question here, but no answer could be found yet:

https://stackoverflow.com/questions/39080285/html2pdf-target-blank

harshmdr commented 2 years ago

Any update here?

dade1987 commented 1 year ago

I have the same problem