[opensource] Printing files from the command line
joseph.181 at osu.edu
Fri Feb 6 17:17:32 EST 2009
I know that you can print files from the command line using 'lp' command.
But doing so requires a file to first be in ps format. I also know that
using 'pdf2ps' will convert a pdf file into the proper format for printing.
But what about printing .doc, .docx, .anything_other_than_pdf formatted
My thought was to use the following algorithm:
(1) convert file to pdf
(2) convert pdf 2 ps using pdf2ps
(3) send to printer using lp
(4) Delete pdf and ps file (if not using pipes to pass things around)
It requires an extra step (converting to pdf) but I figured it was the most
likely to work since printing to pdf is usually an option if you were using
I've got the steps (2)-(4) working without any problems using a simple bash
script. But does anyone know how to accomplish step (1) from a command line?
I'll also accept answers that tell me how to go directly from any file
format to ps or ones that tell me a way to send any file format directly to
the printer without ever needing do any conversions at all.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Opensource