I want to configure my pdf.js in Firefox.

Specifically, I want to set the default zoom from auto to something else, say 150%.

I found a pdfjs.database in about:config, which has a "zoom":"auto" in that table. I changed auto to 150% but nothing happened when I opened a pdf.

It didn't crash and still opened pdf in auto zooming. Is it possible to configure pdf.js for this?

  • What's wrong with auto? There is more than one zoom value. Try changing them all to your own setting. Don't use percent, try a fixed value like "150". – Samir Jun 1 '13 at 20:41

Mozilla have now implemented a default zoom setting, although it's only available through ``about:config```.

You can change the pdfjs.defaultZoomValue in about:config to change the default zoom.

Set it to a number for a number (no percent sign) for a given default percent zoom.

Other possible values are page-width, page-height, page-fit and auto.


|improve this answer|||||
  • Thanks a lot, page-width is what I'm looking for. – LiuYan 刘研 May 8 '15 at 3:39
  • Thanks! Firefox just became my default pdf viewer, it has tabs, it releases the file while open (so I can generate it again with gnuplot), it updates it with F5.... I love Firefox! – Joseph D'Arimathea Dec 18 '19 at 10:55

It appears that the pdfjs.database you found is actually a list of previously opened pdfs and their saved pdf view settings including last read page number and zoom level as well as a couple of other view settings.

On my machine this is a patial display of some of the contents of that key.

{"files":   [{"fingerprint":"7a798210f6814668a779da60662f2c6d","exists":true,"page":4,"zoom":"auto","scrollLeft":0,"scrollTop":617},  

Opening a new pdf and changing the view setting simply added a new item to the end of the list.

While changing the Zoom to 150 on all those items will affect documents you have already opened I do not believe you can set this up for new pdfs.

It appears this feature is known but not being actively worked on. Also see this drupal page.

Source Google Search

|improve this answer|||||
  • +1, won't even affect the viewed items probably, I tried and could not get the change to persist. As soon as I closed the about:config tab or restarted firefox zoom went back to auto. – terdon Jun 2 '13 at 2:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.