Subject: Re: lpr problem (was: Re: FW: Can you offer enscript.cfg file for cygwin?)
From: Rick Rankin <[email-masked]>
To: Charles Wilson <[email-masked]>, "Gerrit P. Haase" <[email-masked]>
Cc: [email-masked]
Date: Sun, 21 Apr 2002 11:32:54 -0700 (PDT)

I'll spend a little time and try to fix it up. Generally, lpr has worked for my
original intent, but when I wrote it, I never intended to publish it. I posted
the source a year or two ago in respose to someone's printing question, and was
very surprised when Chuck asked for permission to include it in cygutils.

I started down a path of adding some features to it a few months ago, then
found out that the Windows printer API didn't support what I was trying to do
in the way I was trying to do it. I was trying to add support for duplex
printing, different paper sizes, et. al., and found out that since lpr wasn't
actually rendering the page, but rather just dumping raw data formatted by
another program (e.g., enscript), I couldn't use those features if the Windows
printer interface. Instead, I would have to have a database of printer commands
for any printer I wanted to support and send the raw commands. I wasn't sure
that level of effort was worth persuing.

Anyway, I generally use a network printer by adding to my local list and giving
it a name such as HPLJ8000-PS, then set my PRINTER environment variable to that
value. So far, that has worked well for me.

As I said, I'll spend some time over the next few days and see if I can fix up
the code a bit and add support for using '/'s in network printer names. Who
knows, I may even generate a man page ;-)

Apparently, I've missed some past discussions of lpr. I'll peruse the mailing
list archives to see if I can find a list of other complaints or problems. If
anyone knows of other issues off the top of your head, send them to me and I'll
try to address them.

--Rick
--- Charles Wilson <[email-masked]> wrote:
> 
> 
> > I have also problems with printing through lpr.  Unfortunately I
> > couldn't figure out how to set it up correct yet.
> > There are some threads in the archives about printing without lpr,
> > maybe there are some hints?
> 
> 
> See my message posted a few minutes ago.
> 
> Currently, lpr.exe from the cygutils package is not documented (at all), 
> and it expects printer shares to be specified using backslash notation:
> 
> \\computer\share
> 
> of course, since those are backslashes, they have to be escaped:
> 
> \\\\computer\\share
> 
> and what's odd, is that sometimes they must be escaped twice
> 
> 
> \\\\\\\\computer\\\\share
> 
> because two shells parse it.  It would be nice (tm) if someone wanted to 
> contribute a man page, and perhaps some code to allow
> 
> a) specifying printer names with forward slashes (autodetect and 
> automatically convert to backslashes before GetHandle'ing the printer)
> 
> b) figure out (and document) how to use local mount names (e.g. instead 
> of \\bob\bigprinter, I've used the Add Printer Wizard and have added 
> this remote printer to my local printer list as "My Friend Bob's Big 
> Fancy Printer".
> 
> c) access to lpt1, lpt2, etc (although prn: seems to work already)
> 
> All together now....patches gratefully accepted.
> 
> --Chuck
> 
> 
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 

__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/