View pdf file in terminal
I want to view pdf
files directly on our cluster rather than copying them to my local machine and then opening them in a viewer.
How can I view a pdf
file in my terminal?
terminal pdf
add a comment |
I want to view pdf
files directly on our cluster rather than copying them to my local machine and then opening them in a viewer.
How can I view a pdf
file in my terminal?
terminal pdf
1
See also unix.stackexchange.com/questions/36201/…
– Marco
Jun 22 '12 at 12:03
2
If you're connectiong to the cluster with ssh, I recommend using SSHFS. It provides a common solution to all “How do I do X with remote files” issues.
– Gilles
Jun 23 '12 at 0:49
Render PDF to framebuffer
– 炸鱼薯条德里克
Feb 7 at 15:55
add a comment |
I want to view pdf
files directly on our cluster rather than copying them to my local machine and then opening them in a viewer.
How can I view a pdf
file in my terminal?
terminal pdf
I want to view pdf
files directly on our cluster rather than copying them to my local machine and then opening them in a viewer.
How can I view a pdf
file in my terminal?
terminal pdf
terminal pdf
edited Sep 20 '16 at 17:02
HalosGhost
3,75392236
3,75392236
asked Jun 22 '12 at 10:27
bioinformaticianbioinformatician
373139
373139
1
See also unix.stackexchange.com/questions/36201/…
– Marco
Jun 22 '12 at 12:03
2
If you're connectiong to the cluster with ssh, I recommend using SSHFS. It provides a common solution to all “How do I do X with remote files” issues.
– Gilles
Jun 23 '12 at 0:49
Render PDF to framebuffer
– 炸鱼薯条德里克
Feb 7 at 15:55
add a comment |
1
See also unix.stackexchange.com/questions/36201/…
– Marco
Jun 22 '12 at 12:03
2
If you're connectiong to the cluster with ssh, I recommend using SSHFS. It provides a common solution to all “How do I do X with remote files” issues.
– Gilles
Jun 23 '12 at 0:49
Render PDF to framebuffer
– 炸鱼薯条德里克
Feb 7 at 15:55
1
1
See also unix.stackexchange.com/questions/36201/…
– Marco
Jun 22 '12 at 12:03
See also unix.stackexchange.com/questions/36201/…
– Marco
Jun 22 '12 at 12:03
2
2
If you're connectiong to the cluster with ssh, I recommend using SSHFS. It provides a common solution to all “How do I do X with remote files” issues.
– Gilles
Jun 23 '12 at 0:49
If you're connectiong to the cluster with ssh, I recommend using SSHFS. It provides a common solution to all “How do I do X with remote files” issues.
– Gilles
Jun 23 '12 at 0:49
Render PDF to framebuffer
– 炸鱼薯条德里克
Feb 7 at 15:55
Render PDF to framebuffer
– 炸鱼薯条德里克
Feb 7 at 15:55
add a comment |
7 Answers
7
active
oldest
votes
In many systems less uses lesspipe, which can handle pdftotext automatically. Therefore, you can immediately try
less file.pdf
which will show the output of pdftotext
in less
.
add a comment |
I guess, it is not possible to see PDF file in terminal but you can check it's content by converting PDF file to text.
You can do this as:
pdftotext a.pdf
It will produce a.txt file which you can read into VIM.
For ubuntu-variant, this binary is available in following package.
poppler-utils
3
It is possible to see a PDF file in the terminal, like so:pdftotext -layout file.pdf - | less
(that's how Ubuntu's defaultlesspipe
script does it)
– villapx
Jun 5 '17 at 13:33
add a comment |
When I want to "view a pdf file in terminal", that for me means that I want to actually see an uncompressed PDF, I do:
pdftk in.pdf output out.pdf uncompress
I always wondered why both less in.pdf
and less out.pdf
give me just text strings in the PDF (and excluding the text-only PDF commands I'd expect in out.pdf
).
Well, that happens because of the lesspipe assuming I want pdftotext
being run first - and since here I don't, I have to specifically disable the lesspipe by setting LESSOPEN
environment variable to nothing; that is:
$ LESSOPEN="" less out.pdf
And finally, I can view the uncompressed PDF code using less
add a comment |
Yet another solution... May I recommend to you the ancient utility mc
.
MC(1) GNU Midnight Commander
mc - Visual shell for Unix-like systems.
mc
is designed around text-based file-management, and it has a “view”
option (F3 key) which will automatically convert .pdfs to text for viewing
without a GUI. The code which does this conversion is part of mc
itself, so it does not require conversion by other utilities. (Also has a native .html viewer for WIW.)
add a comment |
I tried the following with good results:
pdftotext filname.pdf - | less
add a comment |
One more solution is to use command gnome-open
gnome-open youfile.pdf
Provided that you have login your server with -X option (ssh -X)
2
How does this view the PDF file in the terminal?
– a CVn
Feb 27 '13 at 12:27
Not on terminal, but can view a pdf on issuing command from terminal.
– bioinformatician
Feb 28 '13 at 12:40
3
While that is true, the OP did specifically ask for a terminal-based approach.
– a CVn
Feb 28 '13 at 20:52
add a comment |
If you run emacs
on your machine (emacs
comes preinstalled on Ubuntu 18.04), you can virtually open and see a pdf on a remote server by hitting Ctrl-x Ctrl-f
(to find-file
) and then type in /user@hostname:/path/to/my.pdf
and hit Enter (note the very first /
). You will then be prompted to enter the server's password and there it is! You can see the pdf inside emacs.
Navigate through PDF inside emacs
Use space
to go one page down and backspace
to go one page up. You can also use arrow keys to scroll through a single page if it doesn't fit in the screen.
Zoom
Zoom in by hitting Ctrl-x Ctrl-+
. Zoom in more by hitting +
only. Or zoom out more by hitting -
.
Context
Yes, you can connect to a remote server from within emacs
using the build-in package tramp
that works as simple as I explained above. This method works, not only for pdf, but for any other type of file, such as images.
add a comment |
protected by Community♦ Jul 16 '18 at 18:47
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
In many systems less uses lesspipe, which can handle pdftotext automatically. Therefore, you can immediately try
less file.pdf
which will show the output of pdftotext
in less
.
add a comment |
In many systems less uses lesspipe, which can handle pdftotext automatically. Therefore, you can immediately try
less file.pdf
which will show the output of pdftotext
in less
.
add a comment |
In many systems less uses lesspipe, which can handle pdftotext automatically. Therefore, you can immediately try
less file.pdf
which will show the output of pdftotext
in less
.
In many systems less uses lesspipe, which can handle pdftotext automatically. Therefore, you can immediately try
less file.pdf
which will show the output of pdftotext
in less
.
answered Jun 22 '12 at 10:49
Jari LaamanenJari Laamanen
1,7451012
1,7451012
add a comment |
add a comment |
I guess, it is not possible to see PDF file in terminal but you can check it's content by converting PDF file to text.
You can do this as:
pdftotext a.pdf
It will produce a.txt file which you can read into VIM.
For ubuntu-variant, this binary is available in following package.
poppler-utils
3
It is possible to see a PDF file in the terminal, like so:pdftotext -layout file.pdf - | less
(that's how Ubuntu's defaultlesspipe
script does it)
– villapx
Jun 5 '17 at 13:33
add a comment |
I guess, it is not possible to see PDF file in terminal but you can check it's content by converting PDF file to text.
You can do this as:
pdftotext a.pdf
It will produce a.txt file which you can read into VIM.
For ubuntu-variant, this binary is available in following package.
poppler-utils
3
It is possible to see a PDF file in the terminal, like so:pdftotext -layout file.pdf - | less
(that's how Ubuntu's defaultlesspipe
script does it)
– villapx
Jun 5 '17 at 13:33
add a comment |
I guess, it is not possible to see PDF file in terminal but you can check it's content by converting PDF file to text.
You can do this as:
pdftotext a.pdf
It will produce a.txt file which you can read into VIM.
For ubuntu-variant, this binary is available in following package.
poppler-utils
I guess, it is not possible to see PDF file in terminal but you can check it's content by converting PDF file to text.
You can do this as:
pdftotext a.pdf
It will produce a.txt file which you can read into VIM.
For ubuntu-variant, this binary is available in following package.
poppler-utils
answered Jun 22 '12 at 10:40
SHWSHW
8,15553770
8,15553770
3
It is possible to see a PDF file in the terminal, like so:pdftotext -layout file.pdf - | less
(that's how Ubuntu's defaultlesspipe
script does it)
– villapx
Jun 5 '17 at 13:33
add a comment |
3
It is possible to see a PDF file in the terminal, like so:pdftotext -layout file.pdf - | less
(that's how Ubuntu's defaultlesspipe
script does it)
– villapx
Jun 5 '17 at 13:33
3
3
It is possible to see a PDF file in the terminal, like so:
pdftotext -layout file.pdf - | less
(that's how Ubuntu's default lesspipe
script does it)– villapx
Jun 5 '17 at 13:33
It is possible to see a PDF file in the terminal, like so:
pdftotext -layout file.pdf - | less
(that's how Ubuntu's default lesspipe
script does it)– villapx
Jun 5 '17 at 13:33
add a comment |
When I want to "view a pdf file in terminal", that for me means that I want to actually see an uncompressed PDF, I do:
pdftk in.pdf output out.pdf uncompress
I always wondered why both less in.pdf
and less out.pdf
give me just text strings in the PDF (and excluding the text-only PDF commands I'd expect in out.pdf
).
Well, that happens because of the lesspipe assuming I want pdftotext
being run first - and since here I don't, I have to specifically disable the lesspipe by setting LESSOPEN
environment variable to nothing; that is:
$ LESSOPEN="" less out.pdf
And finally, I can view the uncompressed PDF code using less
add a comment |
When I want to "view a pdf file in terminal", that for me means that I want to actually see an uncompressed PDF, I do:
pdftk in.pdf output out.pdf uncompress
I always wondered why both less in.pdf
and less out.pdf
give me just text strings in the PDF (and excluding the text-only PDF commands I'd expect in out.pdf
).
Well, that happens because of the lesspipe assuming I want pdftotext
being run first - and since here I don't, I have to specifically disable the lesspipe by setting LESSOPEN
environment variable to nothing; that is:
$ LESSOPEN="" less out.pdf
And finally, I can view the uncompressed PDF code using less
add a comment |
When I want to "view a pdf file in terminal", that for me means that I want to actually see an uncompressed PDF, I do:
pdftk in.pdf output out.pdf uncompress
I always wondered why both less in.pdf
and less out.pdf
give me just text strings in the PDF (and excluding the text-only PDF commands I'd expect in out.pdf
).
Well, that happens because of the lesspipe assuming I want pdftotext
being run first - and since here I don't, I have to specifically disable the lesspipe by setting LESSOPEN
environment variable to nothing; that is:
$ LESSOPEN="" less out.pdf
And finally, I can view the uncompressed PDF code using less
When I want to "view a pdf file in terminal", that for me means that I want to actually see an uncompressed PDF, I do:
pdftk in.pdf output out.pdf uncompress
I always wondered why both less in.pdf
and less out.pdf
give me just text strings in the PDF (and excluding the text-only PDF commands I'd expect in out.pdf
).
Well, that happens because of the lesspipe assuming I want pdftotext
being run first - and since here I don't, I have to specifically disable the lesspipe by setting LESSOPEN
environment variable to nothing; that is:
$ LESSOPEN="" less out.pdf
And finally, I can view the uncompressed PDF code using less
edited Aug 3 '14 at 3:37
Eric Leschinski
1,30211416
1,30211416
answered Feb 20 '13 at 20:14
sdaausdaau
2,72463151
2,72463151
add a comment |
add a comment |
Yet another solution... May I recommend to you the ancient utility mc
.
MC(1) GNU Midnight Commander
mc - Visual shell for Unix-like systems.
mc
is designed around text-based file-management, and it has a “view”
option (F3 key) which will automatically convert .pdfs to text for viewing
without a GUI. The code which does this conversion is part of mc
itself, so it does not require conversion by other utilities. (Also has a native .html viewer for WIW.)
add a comment |
Yet another solution... May I recommend to you the ancient utility mc
.
MC(1) GNU Midnight Commander
mc - Visual shell for Unix-like systems.
mc
is designed around text-based file-management, and it has a “view”
option (F3 key) which will automatically convert .pdfs to text for viewing
without a GUI. The code which does this conversion is part of mc
itself, so it does not require conversion by other utilities. (Also has a native .html viewer for WIW.)
add a comment |
Yet another solution... May I recommend to you the ancient utility mc
.
MC(1) GNU Midnight Commander
mc - Visual shell for Unix-like systems.
mc
is designed around text-based file-management, and it has a “view”
option (F3 key) which will automatically convert .pdfs to text for viewing
without a GUI. The code which does this conversion is part of mc
itself, so it does not require conversion by other utilities. (Also has a native .html viewer for WIW.)
Yet another solution... May I recommend to you the ancient utility mc
.
MC(1) GNU Midnight Commander
mc - Visual shell for Unix-like systems.
mc
is designed around text-based file-management, and it has a “view”
option (F3 key) which will automatically convert .pdfs to text for viewing
without a GUI. The code which does this conversion is part of mc
itself, so it does not require conversion by other utilities. (Also has a native .html viewer for WIW.)
edited Nov 12 '17 at 19:33
G-Man
13.2k93466
13.2k93466
answered Nov 12 '17 at 19:10
Richard SonnenfeldRichard Sonnenfeld
211
211
add a comment |
add a comment |
I tried the following with good results:
pdftotext filname.pdf - | less
add a comment |
I tried the following with good results:
pdftotext filname.pdf - | less
add a comment |
I tried the following with good results:
pdftotext filname.pdf - | less
I tried the following with good results:
pdftotext filname.pdf - | less
answered Feb 7 at 15:44
jmunschjmunsch
1,7041922
1,7041922
add a comment |
add a comment |
One more solution is to use command gnome-open
gnome-open youfile.pdf
Provided that you have login your server with -X option (ssh -X)
2
How does this view the PDF file in the terminal?
– a CVn
Feb 27 '13 at 12:27
Not on terminal, but can view a pdf on issuing command from terminal.
– bioinformatician
Feb 28 '13 at 12:40
3
While that is true, the OP did specifically ask for a terminal-based approach.
– a CVn
Feb 28 '13 at 20:52
add a comment |
One more solution is to use command gnome-open
gnome-open youfile.pdf
Provided that you have login your server with -X option (ssh -X)
2
How does this view the PDF file in the terminal?
– a CVn
Feb 27 '13 at 12:27
Not on terminal, but can view a pdf on issuing command from terminal.
– bioinformatician
Feb 28 '13 at 12:40
3
While that is true, the OP did specifically ask for a terminal-based approach.
– a CVn
Feb 28 '13 at 20:52
add a comment |
One more solution is to use command gnome-open
gnome-open youfile.pdf
Provided that you have login your server with -X option (ssh -X)
One more solution is to use command gnome-open
gnome-open youfile.pdf
Provided that you have login your server with -X option (ssh -X)
answered Feb 27 '13 at 9:05
bioinformaticianbioinformatician
373139
373139
2
How does this view the PDF file in the terminal?
– a CVn
Feb 27 '13 at 12:27
Not on terminal, but can view a pdf on issuing command from terminal.
– bioinformatician
Feb 28 '13 at 12:40
3
While that is true, the OP did specifically ask for a terminal-based approach.
– a CVn
Feb 28 '13 at 20:52
add a comment |
2
How does this view the PDF file in the terminal?
– a CVn
Feb 27 '13 at 12:27
Not on terminal, but can view a pdf on issuing command from terminal.
– bioinformatician
Feb 28 '13 at 12:40
3
While that is true, the OP did specifically ask for a terminal-based approach.
– a CVn
Feb 28 '13 at 20:52
2
2
How does this view the PDF file in the terminal?
– a CVn
Feb 27 '13 at 12:27
How does this view the PDF file in the terminal?
– a CVn
Feb 27 '13 at 12:27
Not on terminal, but can view a pdf on issuing command from terminal.
– bioinformatician
Feb 28 '13 at 12:40
Not on terminal, but can view a pdf on issuing command from terminal.
– bioinformatician
Feb 28 '13 at 12:40
3
3
While that is true, the OP did specifically ask for a terminal-based approach.
– a CVn
Feb 28 '13 at 20:52
While that is true, the OP did specifically ask for a terminal-based approach.
– a CVn
Feb 28 '13 at 20:52
add a comment |
If you run emacs
on your machine (emacs
comes preinstalled on Ubuntu 18.04), you can virtually open and see a pdf on a remote server by hitting Ctrl-x Ctrl-f
(to find-file
) and then type in /user@hostname:/path/to/my.pdf
and hit Enter (note the very first /
). You will then be prompted to enter the server's password and there it is! You can see the pdf inside emacs.
Navigate through PDF inside emacs
Use space
to go one page down and backspace
to go one page up. You can also use arrow keys to scroll through a single page if it doesn't fit in the screen.
Zoom
Zoom in by hitting Ctrl-x Ctrl-+
. Zoom in more by hitting +
only. Or zoom out more by hitting -
.
Context
Yes, you can connect to a remote server from within emacs
using the build-in package tramp
that works as simple as I explained above. This method works, not only for pdf, but for any other type of file, such as images.
add a comment |
If you run emacs
on your machine (emacs
comes preinstalled on Ubuntu 18.04), you can virtually open and see a pdf on a remote server by hitting Ctrl-x Ctrl-f
(to find-file
) and then type in /user@hostname:/path/to/my.pdf
and hit Enter (note the very first /
). You will then be prompted to enter the server's password and there it is! You can see the pdf inside emacs.
Navigate through PDF inside emacs
Use space
to go one page down and backspace
to go one page up. You can also use arrow keys to scroll through a single page if it doesn't fit in the screen.
Zoom
Zoom in by hitting Ctrl-x Ctrl-+
. Zoom in more by hitting +
only. Or zoom out more by hitting -
.
Context
Yes, you can connect to a remote server from within emacs
using the build-in package tramp
that works as simple as I explained above. This method works, not only for pdf, but for any other type of file, such as images.
add a comment |
If you run emacs
on your machine (emacs
comes preinstalled on Ubuntu 18.04), you can virtually open and see a pdf on a remote server by hitting Ctrl-x Ctrl-f
(to find-file
) and then type in /user@hostname:/path/to/my.pdf
and hit Enter (note the very first /
). You will then be prompted to enter the server's password and there it is! You can see the pdf inside emacs.
Navigate through PDF inside emacs
Use space
to go one page down and backspace
to go one page up. You can also use arrow keys to scroll through a single page if it doesn't fit in the screen.
Zoom
Zoom in by hitting Ctrl-x Ctrl-+
. Zoom in more by hitting +
only. Or zoom out more by hitting -
.
Context
Yes, you can connect to a remote server from within emacs
using the build-in package tramp
that works as simple as I explained above. This method works, not only for pdf, but for any other type of file, such as images.
If you run emacs
on your machine (emacs
comes preinstalled on Ubuntu 18.04), you can virtually open and see a pdf on a remote server by hitting Ctrl-x Ctrl-f
(to find-file
) and then type in /user@hostname:/path/to/my.pdf
and hit Enter (note the very first /
). You will then be prompted to enter the server's password and there it is! You can see the pdf inside emacs.
Navigate through PDF inside emacs
Use space
to go one page down and backspace
to go one page up. You can also use arrow keys to scroll through a single page if it doesn't fit in the screen.
Zoom
Zoom in by hitting Ctrl-x Ctrl-+
. Zoom in more by hitting +
only. Or zoom out more by hitting -
.
Context
Yes, you can connect to a remote server from within emacs
using the build-in package tramp
that works as simple as I explained above. This method works, not only for pdf, but for any other type of file, such as images.
edited Jun 24 '18 at 20:58
answered Jun 23 '18 at 19:21
PooyaPooya
13
13
add a comment |
add a comment |
protected by Community♦ Jul 16 '18 at 18:47
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
1
See also unix.stackexchange.com/questions/36201/…
– Marco
Jun 22 '12 at 12:03
2
If you're connectiong to the cluster with ssh, I recommend using SSHFS. It provides a common solution to all “How do I do X with remote files” issues.
– Gilles
Jun 23 '12 at 0:49
Render PDF to framebuffer
– 炸鱼薯条德里克
Feb 7 at 15:55