public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: cygwin@cygwin.com
Subject: Re: LPR output disappearing
Date: Tue, 01 Jul 2014 21:38:00 -0000	[thread overview]
Message-ID: <53B32A35.1050701@cornell.edu> (raw)
In-Reply-To: <86a98sn9re.fsf@gmail.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

  reply	other threads:[~2014-07-01 21:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27 20:22 David Masterson
2014-06-28  0:35 ` Andrey Repin
2014-06-28  1:35   ` David Masterson
2014-06-30  3:36     ` Jeff Hubbs
2014-07-01  4:53       ` David Masterson
2014-07-01  7:40         ` Marco Atzeri
2014-07-01 15:40           ` David Masterson
2014-07-01 16:20             ` Andrey Repin
2014-07-01 19:45               ` David Masterson
2014-07-01 21:38                 ` Ken Brown [this message]
2014-06-28  1:54   ` David Masterson
2014-06-28  6:00   ` David Masterson
2014-06-28  9:35     ` Andrey Repin
2014-06-29 18:51       ` Adam Dinwoodie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53B32A35.1050701@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).