-   Linux - Desktop (
-   -   print pdf with lpr to specific output directory (

caibbor 01-20-2013 11:05 PM

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.

business_kid 01-21-2013 05:36 AM

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*

caibbor 01-21-2013 06:39 AM

Thanks. command-line is important in this situation because it's going to be used in a script. I'll look into ghostscript.

business_kid 01-22-2013 04:35 AM

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 gs -h to see the backends availble.

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