LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 01-20-2013, 10:05 PM   #1
caibbor
LQ Newbie
 
Registered: Dec 2009
Posts: 16

Rep: Reputation: 0
print pdf with lpr to specific output directory


`lpr -P PDF something_to_print.txt` will print a text file to a pdf. but it always gets stored in ~/PDF (I'm on Mint Linux). I'd like to output to a specific dir but the man page says nothing about such a feature.
 
Old 01-21-2013, 04:36 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,390

Rep: Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557
To quote the Irishman when asked for directions to somewhere:
"You know, if I was you, I wouldn't start from here at all!"

Don't use lpr. You can use 'gs -sDEVICE=pdf -sOutputFile=/over/there/please.pdf' Many things will export to pdf (libreoffice, scribus, etc). Inform yourself on the tools available
ls /usr/bin/*pdf*
 
Old 01-21-2013, 05:39 AM   #3
caibbor
LQ Newbie
 
Registered: Dec 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks. command-line is important in this situation because it's going to be used in a script. I'll look into ghostscript.
 
Old 01-22-2013, 03:35 AM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,390

Rep: Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557Reputation: 557
if you're doing it by command line

gs -dSAFER -dBATCH -dQUIET -sDEVICE=<backend> -sOutputFile=<whereto>

from memory. There's a script that does it on the pfs.txt hint on linuxfromscratch.org. gs -h to see the backends availble.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
some PDF/PS print with LP/LPR some do not ? k.king Linux - General 3 03-25-2006 07:00 AM
lpr pdf printing (even pages upside down) Vismat Linux - General 1 01-26-2006 02:51 PM
OfficeJet G85, CUPS Web based Admin test print works, lpr/lp dose not. ptal-print OK. NLR Linux - Hardware 2 09-20-2004 02:59 PM
Control print output from PHP/HTML... PDF? alar Linux - General 1 08-05-2004 01:20 AM
LPR - print to file or pdf? jefmmill Linux - General 0 05-10-2001 10:33 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration