rkusa / pdfjs

A Portable Document Format (PDF) generation library targeting both the server- and client-side.
MIT License
774 stars 142 forks source link

Possibility to setup the links in PDF files to open in new tab #235

Open voloshynajelena opened 3 years ago

voloshynajelena commented 3 years ago

Hi Markus Thanks for this library!

Is it possible to setup the links in PDF files to open in new tab (behavior like "target = _blank")? Is this feature already implemented?

Thank you!

rkusa commented 3 years ago

Hi, this is not possible with pdfjs right now. https://stackoverflow.com/a/39763562 sums it up quite nicely. While it can be done by embedding JavaScript, it is not a "cross-plattform, guaranteed-to-work way" solution, so I'd probably prefer to not add it. Though a JavaScript actions might be a feature worth adding.