This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: LPR output disappearing
- From: Ken Brown <kbrown at cornell dot edu>
- To: cygwin at cygwin dot com
- Date: Tue, 01 Jul 2014 17:37:57 -0400
- Subject: Re: LPR output disappearing
- Authentication-results: sourceware.org; auth=none
- References: <868uoi9k6p dot fsf at gmail dot com> <76430859 dot 20140628042746 at yandex dot ru> <BD4891F8-6638-457D-8349-6445DB93C5FC at gmail dot com> <53B0DB14 dot 2090705 at att dot net> <86ionhn0iu dot fsf at gmail dot com> <53B265C5 dot 8040600 at gmail dot com> <86egy5m6k8 dot fsf at gmail dot com> <1486425521 dot 20140701201054 at yandex dot ru> <86a98sn9re dot fsf at gmail dot com>
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