When using Firefox on Ubuntu, PDF files are opened in a separate PDF viewer rather than being displayed within the browser window itself.
If you follow this guide, you should be able to get PDF files to open inline, embedded within the Firefox window as in the screenshot below:
To allow PDF files to be opened inline within the browser window, you need to do the following:
Install Mozplugger and Evince:
sudo apt-get install evince mozplugger
Edit the Mozplugger config file:
gksudo gedit /etc/mozpluggerrc
Find the following block of text (or something very similar):
application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file
ACROREAD()
repeat noisy swallow(kpdf) fill: kpdf "$file"
repeat noisy swallow(Xpdf) fill: xpdf -g +9000+9000 "$file"
repeat noisy swallow(okular) fill: okular "$file"
GV()
repeat noisy fill exits: evince "$file"
If you prefer to use the Evince PDF viewer replace the above code with the following:
application/pdf:pdf:PDF file application/x-pdf:pdf:PDF file text/pdf:pdf:PDF file text/x-pdf:pdf:PDF file repeat noisy swallow(evince) fill: evince "$file" ACROREAD() repeat noisy swallow(kpdf) fill: kpdf "$file" repeat noisy swallow(Xpdf) fill: xpdf -g +9000+9000 "$file" repeat noisy swallow(okular) fill: okular "$file" GV() repeat noisy fill exits: evince "$file"
Or if you prefer to use the xpdf PDF viewer, you can use the following lines (make sure you if not already installed that you install xpdf using the command sudo apt-get install xpdf):
application/pdf:pdf:PDF file application/x-pdf:pdf:PDF file text/pdf:pdf:PDF file text/x-pdf:pdf:PDF file repeat noisy swallow(Xpdf) fill: xpdf "$file" ACROREAD() repeat noisy swallow(kpdf) fill: kpdf "$file" repeat noisy swallow(okular) fill: okular "$file" GV() repeat noisy fill exits: xpdf "$file"
Save changes, close all instances of Firefox and Evince/Xpdf and then open firefox and try viewing a PDF file. Everything should now function as you want it to.

hi!
would this enable me to have “firefox” open a .pdf attachment from evolution for example?
therefore the pdf’s context menu in evolution doesn’t have the option “open with” and then to let me choose the program.
hi… i don’t think this will affect evolution, this fix is aimed specifically at opening pdf files in firefox