X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=tFsXxLTp4y23aVQa1gJGcgLWB7+G8X1i+0tDrqPbDqC
	kU6OD8dVTYh+HcAWEl4UOiwr8robf65BkmGCfGWjMCxj/vxOEIRQJS/gwnBTafow
	iys1Zf4VfhSQnt7KhHyQ4aLS88X6TKdasjxyFxj4yUb0T3fBJ7qNR/NvfgNzfUUs
	=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=TRuBgGJdR0Cf9FIvCO8WZ6abA0w=; b=SxigjiUdMA7o8cK9C
	7Ww8QAieZTOo6Ly1IZntagsYR0xP39EkvRjuHmkkvsnivc4y/2LSPMTVMF+ZFUhl
	JAWtsjRL7ay5gh+UrXAXjYa0ilV7CXKkTklCNHST9v19jw9mC7hzKaysN9IyuUR9
	Ss46SouyXZH9ILS/5g65eqvyTw=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL,BAYES_20,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: limerock02.mail.cornell.edu
X-CornellRouted: This message has been Routed already.
Message-ID: <53B32A35.1050701@cornell.edu>
Date: Tue, 01 Jul 2014 17:37:57 -0400
From: Ken Brown <kbrown@cornell.edu>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: LPR output disappearing
References: <868uoi9k6p.fsf@gmail.com> <76430859.20140628042746@yandex.ru>	<BD4891F8-6638-457D-8349-6445DB93C5FC@gmail.com>	<53B0DB14.2090705@att.net> <86ionhn0iu.fsf@gmail.com>	<53B265C5.8040600@gmail.com> <86egy5m6k8.fsf@gmail.com>	<1486425521.20140701201054@yandex.ru> <86a98sn9re.fsf@gmail.com>
In-Reply-To: <86a98sn9re.fsf@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

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

