LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-30-2010, 07:19 AM   #1
jone kim
Member
 
Registered: Apr 2010
Posts: 185

Rep: Reputation: 16
Post open a pdf file via terminal


Can I open a pdf file via terminal. Suppose I want to open a book named 18177059-wrox-beginning-linux-programming-ed2.pdf via terminal. How can I do that?
 
Old 05-30-2010, 07:30 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

If you are talking about starting a terminal from your window manager you can use something like:

acroread filename or xpdf filename

I'm not aware of a program that can read/show pdf files from runlevel 3 (= no window manager).

Hope this helps.
 
Old 05-30-2010, 07:44 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
What is the reason for wanting to do this?

You can start any program from the terminal, but a pdf file normally needs a graphical environment to display properly.

Perhaps there is a program that just shows the raw text---but it might be pretty hard to read without any formatting.
 
Old 05-30-2010, 05:32 PM   #4
Tischbein
Member
 
Registered: Oct 2006
Distribution: debian
Posts: 124

Rep: Reputation: 15
Most desktops have a command that's equivalent to double-clicking a file, e.g. on gnome:

Code:
 gnome-open myfile
has the same effect as opening myfile by double-clicking. xfce has a similar one that I forget (I map the open command to just 'o' on each system I'm on so I forget quite quickly) and I would be very surprised if there wasn't one for KDE.

To convert a pdf to raw ascii I suppose you could use:

Code:
 <infile pdf2ps | ps2txt | less
 
1 members found this post helpful.
Old 06-01-2010, 09:43 PM   #5
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Rep: Reputation: 65
Quote:
Originally Posted by jone kim View Post
Can I open a pdf file via terminal. Suppose I want to open a book named 18177059-wrox-beginning-linux-programming-ed2.pdf via terminal. How can I do that?
Code:
evince 18177059-wrox-beginning-linux-programming-ed2.pdf
 
1 members found this post helpful.
Old 06-02-2010, 01:53 AM   #6
Raveolution
Member
 
Registered: Mar 2004
Distribution: Fedora & CentOS
Posts: 213
Blog Entries: 2

Rep: Reputation: 26
Quote:
Originally Posted by Tischbein View Post
Most desktops have a command that's equivalent to double-clicking a file, e.g. on gnome:

Code:
 gnome-open myfile
has the same effect as opening myfile by double-clicking. xfce has a similar one that I forget (I map the open command to just 'o' on each system I'm on so I forget quite quickly) and I would be very surprised if there wasn't one for KDE.
gnome-open, eh? Glad I read this.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xdvik does not open of pdf file when a hyperlink is clicked centguy Linux - Software 4 08-05-2009 12:36 AM
How to open a .pdf file satimis Ubuntu 5 09-15-2007 09:33 AM
Some .pdf file cannot open....:( kenshinji Linux - Software 12 12-06-2005 07:37 PM
trying to open a pdf file kotoko Linux - Newbie 6 12-06-2005 07:36 PM
Convert Open Office file to PDF file. liguorir Linux - Software 1 01-13-2004 12:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration