Tag: pdfjs

PDF.js Open Links in New Tab

Since the release of PDF.js 2.0.943 you can force URL to open in a new tab: <script> function applyConfig() { PDFViewerApplication.preferences.set('externalLinkTarget', 2); } document.addEventListener('DOMContentLoaded', applyConfig, true); </script> Older versions we used: PDFJS.externalLinkTarget = PDFJS.LinkTarget.BLANK; This is also a hack that might work on newer versions but