This is the mail archive of the
mailing list for the Cygwin project.
Re: Lp/lpr equiv or how do I print
- To: Brian Keener <bkeener at thesoftwaresource dot com>
- Subject: Re: Lp/lpr equiv or how do I print
- From: Jason Tishler <Jason dot Tishler at dothill dot com>
- Date: Fri, 6 Oct 2000 08:01:01 -0400
- Cc: cygwin <cygwin at sourceware dot cygnus dot com>
- Organization: Dot Hill Systems Corp.
- References: <VA.email@example.com>
On Thu, Oct 05, 2000 at 05:49:38PM -0400, Brian Keener wrote:
> How do I get something output (namely a source code listing) to the
> printer from within cygwin (bash shell) on a Win95 machine. My lpt1 is
> being captured by a network printer but when I do a cat filename >lpt1 I
> get one just a couple lines of output and then a lot of empty pages and
> the couple of lines seem to be missing the carriage returns but have the
> line feeds. I have tried looking in the mail archive and haven't found
> anything that really helps. Would appreciate any suggestions.
The following is the setup for PCL printers:
I use the combination of a2ps and GhostScript to print to our PCL
printers. You can find a2ps and GhostScript at:
IIRC, a2ps builds OOTB -- so do the configure, make, make install thing.
GhostScript is already pre-built for Win32 -- so do the point and grunt
See the first attachment for my PCL version of lpr -- just put it
somewhere in your PATH. You will need to modify GS and Printer to
match your environment. The last component of Printer should match your
printer name as it is listed in Control Panel/Printers including spaces.
Setting -sOutputFile properly is supposed to stop GhostScript from
prompting the user for the desired printer. Unfortunately no matter
what I specify for the -sOutputFile option, gswin32c prompts for the
printer even though I only have one defined printer. Sigh...
The following is the setup for PostScript printers:
I also use the combination of a2ps and Microsoft TCP/IP Printing to
print to our Postscript printers.
Build and install a2ps. Use Control Panel/Network/Services/Add... to
install Microsoft TCP/IP Printing.
See the second attachment for my PostScript version of lpr -- just put it
somewhere in your PATH. You will need to modify Server and Printer to
match your environment.
Printing is as simple as:
$ a2ps foo.c
Director, Software Engineering Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corporation Fax: +1 (732) 264-8798
82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA WWW: http://www.dothill.com
Printer='\\spool\HP LaserJet 3100'
"$GS" -sDEVICE=mswinpr2 -sPAPERSIZE=letter -dBATCH -dNOPAUSE -r600 -dSAFER -sOutputFile="$Printer" -q -_
WinDir=$(cygpath -u $WINDIR)
WinTempFile=$(cygpath -w $TempFile)
$Lpr -S $Server -P $Printer "$WinTempFile"
rm -fr $TempFile
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org