[OS X TeX] Duplex printing using lp from command-line?

Peter Breitfeld phbrf at t-online.de
Sat Mar 19 19:49:57 CET 2005


Am 19. Mrz 2005 um 19:22 schrieb Johan Glimming:

> Dear TeXperts,
>
> I want to duplex print a postscript file from command-line in Mac OS 
> X. The printer
> is a LJ4000TN with duplex unit. I could change the printer into duplex 
> mode, but this
> is not a good solution since occasionally I prefer to print in single 
> page mode.
>
> Therefore, I wonder how to make "lp file.ps" change the printer to 
> duplex mode...
>
> Best Wishes,
> Johan Glimming
> --------------------- Info ---------------------
> Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
>           & FAQ: http://latex.yauh.de/faq/
> TeX FAQ: http://www.tex.ac.uk/faq
> List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>
>
There exists a small perl-skript, named psopts which includes a 
postscript header wich forces the printer to print in duplex mode.
You can get it from my web-site (see below, sorry it's in german).

All you have to do then is to create a file named e.g. config.duplex 
consisting of the following line:

o | psopts -duplex - | lpr -l      (newline needed after this line!)

and put it at the right place. I have it in
$HOMETEXMF/dvips/config/

All you have to do then is to print with dvips:

dvips thefile.ps -Pduplex


You even can take a ps-File and call

psopts -duplex | lpr -l

because psopts writes to stdout.

Remark: I have to call lpr with parameter -l, otherwise sometimes the 
printer driver tries to make changes to my file -- interestingly not 
always

Hope this helps.


Gruß Peter
-- 
===-==-==-==-==-==-==-==-==-==-===-==-==-==-==-==-==-==-==-==
Peter Breitfeld                 | http://www.pBreitfeld.de
Kreuzgasse 4, 88348 Bad Saulgau | PGP/GnuPG Key ist vorhanden
===-==-==-==-==-==-==-==-==-==-===-==-==-==-==-==-==-==-==-==

--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the macostex-archives mailing list