The default bug view has changed. See this FAQ.

application/pdf files are saved in Downloads when using a new profile and pdfjs is disabled




File Handling
2 years ago
2 years ago


(Reporter: Vincent Lefevre, Unassigned)


(Blocks: 1 bug)

38 Branch

Firefox Tracking Flags

(Not tracked)




2 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.2.0
Build ID: 20150811213123

Steps to reproduce:

1. Start Firefox 40.0.2 with a new profile.
2. Toggle pdfjs.disabled to true (e.g. for security reasons).
3. Click on a link offering a PDF file, e.g. on (there's the choice between "PDF" and "gzipped PS", so that one can see that what works with "gzipped PS" doesn't work with "PDF").

Actual results:

The PDF file is silently downloaded and saved to the ~/Downloads directory.

Expected results:

One should get an "Opening..." dialog box giving the choice between opening the file in an external application or saving it (or cancel).

Note: In Preferences → Applications, for "Portable Document Format", I have by default (just after the profile creation): xpdf. I can switch to "Always Ask" to solve the problem (well, there's just a small display bug in the dialog box), but what matters here is that the default is incorrect.

Same problem with Debian's Iceweasel 38.2.0.


2 years ago
Component: Untriaged → File Handling
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Comment 1

2 years ago
The "xpdf" for the default configuration seems to come from my ~/.mailcap file:

application/pdf; xpdf '%s'; test=test -n "$DISPLAY"; description=Portable Document Format; nametemplate=%s.pdf

strace -f shows that Firefox reads this file, then searches for the xpdf path:

24419 open("/home/vinc17/.mailcap", O_RDONLY) = 45
24419 read(45, "# .mailcap file (for some applic"..., 4096) = 336
24553 execve("/bin/sh", ["/bin/sh", "-c", "test -n \"$DISPLAY\""], [/* 141 vars */]) = 0
24419 close(45)                         = 0
24419 open("/home/vinc17/.mime.types", O_RDONLY) = -1 ENOENT (No such file or directory)
24419 open("/etc/mime.types", O_RDONLY) = 45
24419 read(45, "################################"..., 4096) = 4096
24419 close(45)                         = 0
24419 access("/home/vinc17/software/firefox/browser/xpdf", F_OK) = -1 ENOENT (No such file or directory)
24419 access("/home/vinc17/eftests/bin/xpdf", F_OK) = -1 ENOENT (No such file or directory)
24419 access("/home/vinc17/bin/xpdf", F_OK) = -1 ENOENT (No such file or directory)
24419 access("/home/vinc17/./bin/xpdf", F_OK) = -1 ENOENT (No such file or directory)
24419 access("/home/vinc17/perl5/bin/xpdf", F_OK) = -1 ENOENT (No such file or directory)
24419 access("/usr/local/bin/xpdf", F_OK) = -1 ENOENT (No such file or directory)
24419 access("/usr/bin/xpdf", F_OK)     = 0
24419 access("/usr/bin/xpdf", F_OK)     = 0
Blocks: 1194668
You need to log in before you can comment on or make changes to this bug.