5
Chrome can view PDF file, so I decide to make it as my default PDF viewer. However, I do not know how to open PDF file in chrome via my terminal emulator.
I have tried a command google-chrome example.pdf
, but it failed while the address is not file:///path/to/example.pdf/
but http://example.pdf/
.
My English is not good, so you can edit the question if necessary.
Thank you!
Updated: Sorry for I did not mention that the solution must be effective for GNU/Linux.
Did you try "google-chrome file:///path/to/example.pdf"? – Jan Doggen – 2013-08-22T08:00:09.040
@JanDoggen It works, but it is too boring while I can not press tab to complete it quickly. Is there any better method? – acgtyrant – 2013-08-22T09:19:29.420
Works for me. What Chrome version are you running? Try
google-chrome ./example.pdf
, perhaps —example.pdf
looks like a domain name but as soon as you add a/
it looks like a file name. – Gilles 'SO- stop being evil' – 2013-08-22T09:39:11.283@acgtyrant I don't know Linux, but can't you make script saying "google-chrome file:///path/to/%1.pdf" (like a Windows batch file) ? – Jan Doggen – 2013-08-22T09:51:28.750
@Gilles
google-chrome ./example.pdf
still turns in tohttp://./texlive-zh-cn.pdf
. @JanDoggen No, I do not have any idea:) – acgtyrant – 2013-08-22T10:34:33.063