[opensource] Printing files from the command line

Paul Betts paul at paulbetts.org
Fri Feb 6 20:31:41 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
> files?
> 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)

Oh, you kids are adorable:

$ man oowriter
       -pt printername filename...
              Prints the given files to the printer printername and
ends. The splash screen does not appear.

              If the file name contains spaces, then it must be
enclosed in quotation marks.

Paul Betts <paul at paulbetts.org>

More information about the Opensource mailing list