4

I am trying to open a .pdf file with FoxitReader from the terminal.

The following works on the terminal:

/opt/foxitsoftware/foxitreader/FoxitReader "Document.pdf"

But this doesn't:

/opt/foxitsoftware/foxitreader/FoxitReader "Document.pdf /A page=5" It launches the FoxitReader GUI application, displaying "the file could not be found". The document has more than 5 pages.

  • Foxit Reader version is 2.4.1.0609
  • Ubuntu 16.04

is this option not available for linux systems? Did the syntax change? Do I need to install a plugin?

I also tried

/opt/foxitsoftware/foxitreader/FoxitReader -h
/opt/foxitsoftware/foxitreader/FoxitReader --help

but it fails to open these, too :(

Edit: I attempted the same in Adobe Acrobat Reader

/opt/Adobe/Reader9/bin/acroread /A "page=3" "Document.pdf"

with the same result. As always, instructions are documented for windows. I tried a couple of other PDF viewer now...

is there any free PDF reader able to:

  • run in linux
  • open PDF at a specific page
  • highlight text
  • display page in full view (optional)

?

thank you

4
  • evince -i 5 "Document.pdf" works Oct 8, 2018 at 23:08
  • okular -p 5 "Document.pdf" works Oct 8, 2018 at 23:14
  • Hello. Please add those as an answer below. You can edit your answer later if you discover new ways of doing it. After a while, you'll be able to accept the best answer by clicking the checkmark to the left of it, which can be yours if you want. Oct 8, 2018 at 23:14
  • aww, God, the option is lowercase for linux instead of uppercase. This is NOT according to the documentation. That settles it for Acrobat, Foxit's still refusing to work. Oct 9, 2018 at 0:07

2 Answers 2

6

Evince is a PDF viewer able to open PDF files at a specific page using the terminal with the following command:

evince -i 5 "path/to/document.pdf"

where -i option specifies the page of the document, 5 in this example, and the second argument specifies the path to the document to open.

Okular is a PDF viewer able to open PDF files at a specific page using the terminal with the following command:

okular -p 5 "path/to/document.pdf"

where -p option specifies the page of the document, 5 in this example, and the second argument specifies the path to the document to open.

Acrobate Reader is a PDF viewer able to open PDF files at a specific page using the terminal with the following command:

/opt/Adobe/Reader9/bin/acroread /a "page=5" "path/to/document.pdf"

where page=5 is the argument that specifies the page of the document, 5 in this example, and the second argument specifies the path to the document to open.

2

The Firefox PDF viewer will open at a page number by appending #page= followed by the page number to the URL, for example

firefox "file://$PWD/myfile.pdf#page=150"

The quotes are necessary if there is a space in your current path name. I like to use symbolic links and this won't work from the shell if the file is a symbolic link, but this does

firefox "file://$(realpath myfile.pdf)#page=150"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .