Firefox pdf-viewer don't work

5,669

Firefox 35's PDF Viewer (pdf.js) works here (tested with Kubuntu 14.04 and Arch Linux). If it "does not work" (a download is offered instead) for you, check that you have actually enabled the PDF preview functionality:

  1. Go to menu Edit -> Preferences.
  2. Select the tab Applications.
  3. Search for pdf.
  4. Ensure that the Action is set to Preview in Firefox.

If you do not see the Preview in Firefox option, perhaps it got disabled somehow. Follow these instructions to re-enable PDF.js:

  1. Type about:config in your location bar and press Enter.
  2. Accept the This may void your warranty! joke/warning by pressing the I'll be careful, I promise! button.
  3. Search for the pdfjs.disabled option.
  4. If the value is set to true, double-click it.
  5. Confirm that the value is set to false.
  6. Repeat the previous steps (go to Edit -> Preferences, etc.)

If PDF still get offered as download, then it is possible that the website in question tries to force a download (this can be requested by websites using the Content-Disposition header). In this case, you need an additional add-on to force inline display:

  1. Install the Open in Browser add-on.
  2. When a PDF file is offered for download, the download dialog will have an additional Open in browser as option. Select PDF.
  3. Press OK. The PDF file will now be shown in the browser.

These documents were used for testing (first Google results):

Share:
5,669

Related videos on Youtube

UNIm95
Author by

UNIm95

Updated on September 18, 2022

Comments

  • UNIm95
    UNIm95 almost 2 years

    After Firefox update from 34 to 35 via

    apt-get upgate; apt-get upgrade
    

    I can't open pdf's in Firefox. Download and read with evince works fine. How can i fix it?

    • OS: Ubuntu 12.04
    • Firefox 35(latest in repo)
  • Lekensteyn
    Lekensteyn over 9 years
    @UNIm95 Check the edit on using about:config.
  • UNIm95
    UNIm95 over 9 years
    What exactly should i check? pdfjs.disabled is in false.
  • Lekensteyn
    Lekensteyn over 9 years
    @UNIm95 Can you reproduce with a clean profile? For instance mkdir -p /tmp/firefox-test && firefox -no-remote -profile /tmp/firefox-test. Did you change anything else? Also try to start with add-ons disables (Help -> Restart with Add-ons disabled).
  • UNIm95
    UNIm95 over 9 years
    With clean profile it works fine. But i found one more problem(In clean mode too). Now all flash videos working "laggy". It s not problem of internet connection, because smplayer works without with 1440p videos on youtube. Should i create extra question with second problem?
  • UNIm95
    UNIm95 over 9 years
    With disabled addons it ask's to save pdf.
  • Lekensteyn
    Lekensteyn over 9 years
    For the player question, try to figure out the cause and/ or create a new question. If you wish to recover your current profile, could you navigate to about:support, press the Copy text to clipboard button and paste this somewhere? You could also try the Refresh Firefox... button, but I have no idea what it does, but it looks like it can lose some settings.
  • UNIm95
    UNIm95 over 9 years
    With Refresh Firefox i get same behavior like with new profile. PDF-viewer works fine. But I lost my plugins with their configs. Good that i made backup of '~/.mozilla' and with 'no-remote -profile' brought all back. For me is this problem solved. Should i post how i made this this like Answer on your own Question?
  • Lekensteyn
    Lekensteyn over 9 years
    If your steps varied from what I described here, you could post your answer. Then mark your own as accepted (and upvote other posts which were helpful).
  • Jacques MALAPRADE
    Jacques MALAPRADE over 8 years
    Followed your steps in about:config and edit > preferences etc. but now there is no option to preview, only download, show in document viewer or ask.