This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: lpr problem (was: Re: FW: Can you offer enscript.cfg file for cygwin?)


Please keep Cygwin-related messages on the list.

I have done some work on lpr. It now accepts forward slashes in the device
name, i.e., //server/shared_printer_name. It also has /some/ support for using
Windows device names (e.g., lpt1 or prn); however, I don't have a very good way
to test this because all the printers I use, both at work and at home, are
networked.

Frankly, I more-or-less forgot about these modifications because before I
finished them, Chuck Wilson went off-list for a period of time. lpr is
distributed as part of Chuck's cygutils package, and I didn't think it was
worth bothering him for this. 

Is there any interest in getting these modifications into the cygutils
distribution?

--Rick

--- Dekai Wu <dekai at cs dot ust dot hk> wrote:
> Dear Rick,
> 
> Just wondering if anything developed from this?
> 
> Btw, regarding possible other issues, one issue we've encountered is using
> printers that the Windows PC is accessing via http (Internet Printing
> Protocol)
> as opposed to the old-fashioned \\host\printer type of setup.
> 
>     Cheers,
>     -Dekai
> 
> Dr. Dekai Wu, Associate Professor, HKUST
> Dept of Computer Science, Univ of Science & Technology, Clear Water Bay,
> Hong Kong
> tel +852 2358.7000 / dir +852 2358.6989 / fax +852 2358.1477
> dekai at cs dot ust dot hk / www.cs.ust.hk/~dekai
> 
> ----- Original Message -----
> From: Rick Rankin
> To: Charles Wilson, "Gerrit P. Haase"
> Cc: cygwin at cygwin dot com
> Sent: Sun, 21 Apr 2002 11:32:54 -0700 (PDT)
> Subject: Re: lpr problem (was: Re: FW: Can you offer enscript.cfg file for
> cygwin?)
> 
> 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 <cwilson at ece dot gatech dot edu> 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/
> 
> 


--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]