www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/11/30/13:07:12

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Thu, 30 Nov 2000 12:31:39 EST
X-Mailer: Virtual Access by Atlantic Coast PLC, http://www.atlantic-coast.com/va
Message-Id: <VA.0000057f.00501876@thesoftwaresource.com>
To: cygwin <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: Lp/lpr equiv or how do I print
In-Reply-To: <20001128123520.A183@dothill.com>
From: Brian Keener <bkeener AT thesoftwaresource DOT com>
Reply-To: bkeener AT thesoftwaresource DOT com

Jason,

Thought I would expand a little on this from my own experience.  You may 
already know this but I thought I would throw it out just in case.

When I set up my a2ps I also created a symlink for lp in (/usr/local/bin 
- installed there by default) which was linked to a2ps which now gave me 
lp capability just like I would have in unix.  So instead of using a2ps I 
can use the command lp and works either as a command or as a pipe (as you 
might expect) by doing:

lp foo.txt
or 
cat foo.txt | lp

Since I installed GSView along with GSPrint the next thing I did was to 
try to get GSView working as a diplay printer.  To accomplish this I 
located the section in a2ps.cfg (in /usr/local/etc in the default 
install) which dealt with the display and ghostview.  It had several 
example variable lines but I added the following in that section:

Variable: ghostview /cygdrive/d/Aladdin/ghostgum/gsview/gsview32 
-dNOPLATFONTS

I also modified the line that defines the display printer so that it read 
as follows:

Printer: display | cat > #f0 && #{ghostview} `cygpath -w #f0`

Notice the use of cygpath - this was because the #f0 was a cygwin 
relative path and gsview32 wanted a wwindows style.

This now gave me the ability to do:

lp foo.txt -Pdisplay 

or to use a user option (which was already there) and display in color as 
follows:

lp foo.txt -=display   or lp foo.txt --user-option=display

I also still wanted the ability to select the printer and to this end I 
modified the line in your lp/lpr script for PCL printers which actually 
calls gsprint to read as follows:

"$GSPRINT" -printer "$2" -_ >$LOGFILE 2>&1

This gave me the option to now be able to enter:

lp -P"HP LaserJet 5Si Mopier"

and thus control what printer it went to.  However I got tired of trying 
to type the Printer name as it appears in Printers in Control Panel so I 
added these two lines to the printer configuration in a2ps-site.cfg:

Printer: fulton | #{lp} "HP LaserJet 5Si Mopier" #o
Printer: home | #{lp} "HP PhotoSmart P1000 Series" #o

These lines now give me the ability to do:

lp -Pfulton foo.txt
or 
lp -Phome foo.txt

depending on which printer I want it to go to.

Thought that if you hadn't already done this or didn't know about it - 
you might find it interesting.

Brian Keener
bkeener AT thesoftwaresource DOT com




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019