Pdf.js: PDFs with bookmarks (outline) annoyingly revert to Page Fit zoom level when clicking on a bookmark

Created on 4 Dec 2017  路  4Comments  路  Source: mozilla/pdf.js

Configuration:

  • Browser: Firefox 57
  • OS: Windows 7 SP1/Ubuntu 18.04 development version
  • PDF.js version: the one included with Fx 57
  • Is a browser extension: no

Steps to reproduce the problem:

  1. Open this file.
  2. Change the default zoom level to e.g. Fit Width.
  3. Click on any item from the outline.

I expect the zoom level to stay the same after clicking on the bookmark; the only effect of clicking it is to jump to a certain page. Instead, what happens is that I get to the requested page but the zoom level reverts to Page Fit.

Most helpful comment

Can鈥檛 we have an about:config preference to override this behavior?

All 4 comments

That's expected behavior -- PDF bookmarks indeed override zoom to fit the page. Acrobat Reader behaves the same way. Closing as invalid.

The "links" (or destinations, as they are called in PDF files), can and in this case do specify the zoom level that should be used when they are clicked.
Compare with e.g. Adobe Reader, where the behaviour is the same as in PDF.js. Please refer to the PDF specification for additional information, e.g. here and here.

Closing as invalid, since this works as intended.

Can鈥檛 we have an about:config preference to override this behavior?

Sorry for bumping a 3 year old issue, but for posterity's sake, this:

Can鈥檛 we have an about:config preference to override this behavior?

now exists. Simply enable pdfjs.ignoreDestinationZoom in about:config.

Was this page helpful?
0 / 5 - 0 ratings