Firefox直接打开PDF

来源:互联网 发布:天猫历年双11数据分析 编辑:程序博客网 时间:2024/06/01 08:31

系统Ubuntu,之前用Firefox打开PDF文件都要下载到本地后打开,很麻烦。

查了一下,可以用evince和mozplugger让Firefox直接打开PDF。

 

Step 1:

安装evince 和 mozplugger:

sudo apt-get install evince mozplugger

Step 2:
编辑 mozpluggerrc
sudo gedit /etc/mozpluggerrc

Step 3:
找到以下行:
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"

Step 4:
再找到以下行:
application/x-postscript: ps: PostScript file
application/postscript: ps: PostScript file

再在之后添加同样的内容:
repeat noisy swallow(evince) fill: evince "$file"

Step 5:
保存。Firefox不用重启,就可以直接打开PDF了!

参考:
http://ubuntuforums.org/showthread.php?t=25685


原创粉丝点击