如何让 Chromium 使用 Evince 显示 PDF?

pot*_*fee 5 chromium evince

有什么方法可以让 Chromium 使用 mozpluggerrc/evince 组合来显示嵌入到自己窗口中的 PDF?现在,Chromium 只是下载 PDF。我可以通过单击下载的文件在外部 evince 窗口中打开它们。

我在 Ubuntu 12.04 (amd64) 下使用 Chrome 18.0.1025.168。这是我的 /etc/mozpluggerrc.d/62-documents.conf 的 pdf 部分:

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 needs_xembed: evince "$file"
Run Code Online (Sandbox Code Playgroud)

mozpluggerrc 确实出现在 about:plugins 中。

顺便说一句,这在 Firefox 中工作得很好。

注意:我不是在寻找有关如何在 Chromium 中使用 Google Chrome 的 PDF 插件的提示。

ate*_*enz 7

/etc/mozpluggerrc.d编辑40-global_defs.conf和添加

### Evince
define(EVINCE, [repeat swallow(evince) fill needs_xembed: evince "$file"])
Run Code Online (Sandbox Code Playgroud)

现在 /etc/mozpluggerrc.d/62-documents.confGV() & ACROREAD() (虽然不是必需的)需要用EVINCE()替换为

application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file
Run Code Online (Sandbox Code Playgroud)

EVINCE() << 以前的 ACROREAD()

    repeat noisy swallow(Xpdf) fill needs_xembed: xpdf -g +9000+9000 "$file"
    repeat noisy swallow(okular) fill needs_xembed: okular "$file"
        repeat noisy swallow(epdfview) fill needs_xembed: epdfview "$file"
Run Code Online (Sandbox Code Playgroud)

EVINCE() << 以前的 GV()

    repeat noisy swallow(evince) fill needs_xembed: evince "$file"
Run Code Online (Sandbox Code Playgroud)

保存并尝试在 Chromium 中打开 PDF 文件,它将以 evince 打开。

感谢这个原始来源