pdfJsViewer "back" navigation


I just got a request from a customer regarding browsing a PDF. It’s about links within the file. When you click on a link (e.g. link to annotations at the end of the document), there seems to be no way to jump back to the position in the document where you came from.

Is there a way to do a “back” as we we used to in doing in a web browser? According to Frequently Asked Questions · mozilla/pdf.js Wiki · GitHub there is no such functionality. @asmecher Can you estimate how complex it would be to implement such a feature?

Or is it possible to use another PDF reader in OJS?


Hi @edelm,

I think this depends on how you set up your PDF - this isn’t really a function of OJS, but rather how you prepare your galley outside of it using whatever editor. You might find this helpful if you’re using a PDF editor: How to Create Internal Links in PDFs with Adobe Acrobat

I think too, if you’ve set up internal links in MS Word or similar word processor and then convert that document to PDF, those links would stay in place (you could probably Google how to do that in MS Word or your word editor of choice).

PKP Team

I played around with it a bit more. When I click on the “download” button on top, the PDF opens in the firefox-pdf-reader. Within this reader, I can use Alt+left to navigate back to where I came from within the PDF. In the pdfJsViewer it jumps back to the previous site. I assume, the firefox-pdf-reader catches Alt+left (and uses the command to navigate within the PDF) whereas the jsPdfViewer passed Alt+left through to the browser (which then goes to the previous URL outside of the PDF).

Since Alt-left navigation (“back”) works in the same PDF document when opening it in the firefox-pdf-plugin (using the download-button in pdfJsViewer), I assume it’s not a issue of how the PDF is created. pdfJsViewer seems to send the Alt-left through to the browser (which then navigates to the previous url) whereas the firefox-pdf-plugin does a “back” navigation.