如何在 Linux 中通过命令在 Chrome 中打开 PDF 文件?

acg*_*ant 6 linux pdf google-chrome command-line

Chrome 可以查看 PDF 文件,因此我决定将其设为我的默认 PDF 查看器。但是,我不知道如何通过我的终端模拟器在 chrome 中打开 PDF 文件。

我尝试了一个命令google-chrome example.pdf,但它失败了,而地址不是file:///path/to/example.pdf/but http://example.pdf/

我的英语不好,所以你可以根据需要编辑问题。

谢谢!

更新:抱歉,我没有提到该解决方案必须对 GNU/Linux 有效。

小智 2

右键单击 pdf 文件并使用 Chrome 应用程序打开更改并应用更改。有关更多信息,请参阅此链接 也可以使用命令行来完成。只需使用下面的命令行

<path to chrome.exe> <path to pdf file>
Run Code Online (Sandbox Code Playgroud)