Mail Archives: cygwin/2000/10/06/08:02:02
--XgsoQIXtLP59dlD+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Brian,
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.
PCL Setup:
=== =====
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:
ftp://ftp.enst.fr/pub/unix/a2ps/a2ps-4.13.tar.gz
and
ftp://ftp.cs.wisc.edu/pub/ghost/aladdin/gs601/gs601w32.exe
respectively.
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
thing.
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...
PostScript Setup:
========== =====
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.
Print Command:
===== =======
Printing is as simple as:
$ a2ps foo.c
Jason
--
Jason Tishler
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 DOT Tishler AT dothill DOT com
Hazlet, NJ 07730 USA WWW: http://www.dothill.com
--XgsoQIXtLP59dlD+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=lpr
#! /bin/bash
GS=/mnt/d/Program\ Files/Aladdin/gs6.01/bin/gswin32c
Printer='\\spool\HP LaserJet 3100'
"$GS" -sDEVICE=mswinpr2 -sPAPERSIZE=letter -dBATCH -dNOPAUSE -r600 -dSAFER -sOutputFile="$Printer" -q -_
--XgsoQIXtLP59dlD+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=lpr
#!/bin/bash
Server=prodserv
Printer=eng-duplex
ProgramName=$(basename $0)
WinDir=$(cygpath -u $WINDIR)
Lpr=$WinDir/system32/lpr
TempFile=/tmp/$ProgramName.$$
WinTempFile=$(cygpath -w $TempFile)
cat >$TempFile
$Lpr -S $Server -P $Printer "$WinTempFile"
Status=$?
rm -fr $TempFile
exit $Status
--XgsoQIXtLP59dlD+
Content-Type: text/plain; charset=us-ascii
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
--XgsoQIXtLP59dlD+--
- Raw text -