Chrome 内置 PDF 浏览功能,在下便打算把它首选为默认 PDF 阅读器,但是在虚拟终端里不知要执行怎样的命令才能通过 Chrome 打开当前目录下的任意 PDF 文件。
假设当前工作目录下有 example.pdf
且 Chrome 的启动命令为 google-chrome
,当执行命令 google-chrome example.pdf
时,Chrome 能启动且会新建窗口并尝试载入,但其地址栏是 http://example.pdf/
,并非理想的 file:///path/to/example.pdf/
。
谢谢!
If you use Linux, use this script of mine:
chrome-file
,chmod +x chrome-file
,sudo cp chrome-file /usr/local/bin
.chrome-file <file>
to open the file in chrome by simply giving the relative path to the file. Supported file types include html, pdf, txt, pictures, etc.Try it!
You need to have pdf extension
and then
chromium path (path is your pdf file path + file name)