LPR output disappearing

Ken Brown kbrown@cornell.edu
Tue Jul 1 21:38:00 GMT 2014


On 7/1/2014 3:45 PM, David Masterson wrote:
> Hmmm.  Still something I am not getting:
>
> 1. GV under Cygwin can display the PDF fine.  That's what GV is meant to
> do -- be a viewer for PDF/PS.
> 2. GV has a print capability.  By default, it (seems to) uses LPR for
> the printout mechanism.

gv uses lpr for printing because of the following line in 
/usr/share/gv/gv_system.ad:

   GV.printCommand:	lpr

This presumably works for pdf files on Linux and other unix-like 
systems; but it doesn't work on Cygwin because Cygwin's /usr/bin/lpr 
simply sends raw data to the printer.  If you want to be able to print 
pdf files from gv on Cygwin, I think you'll have to replace lpr by a 
program that knows how to print pdf files.  I suspect that you can do 
this by using gsprint.exe from the Windows GSview distribution.  I've 
never needed to figure out how to do this, but maybe some variant of the 
following works.  (I use it for printing postscript.)

$ cat ~/bin/lpr
#! /bin/bash
# Print stdin on default printer.
GSPRINT=$HOMEDRIVE/Program\ Files\ \(x86\)/Ghostgum/gsview/gsprint.exe
LOGFILE=/tmp/lpr.log
"$GSPRINT" -_ >$LOGFILE 2>&1

And here's a version that prompts you to choose the printer:

$ cat ~/bin/lprq
#! /bin/bash
# Print stdin, querying for printer.
GSPRINT=$HOMEDRIVE/Program\ Files\ \(x86\)/Ghostgum/gsview/gsprint.exe
LOGFILE=/tmp/lpr.log
"$GSPRINT" -query -_ >$LOGFILE 2>&1

Ken

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list