From wkwu@ccbsd1.csie.nctu.edu.tw  Fri Mar  9 08:47:21 2001
Return-Path: <wkwu@ccbsd1.csie.nctu.edu.tw>
Received: from ccbsd1.csie.nctu.edu.tw (ccbsd1.csie.nctu.edu.tw [140.113.209.61])
	by hub.freebsd.org (Postfix) with ESMTP id E651537B71A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  9 Mar 2001 08:47:19 -0800 (PST)
	(envelope-from wkwu@ccbsd1.csie.nctu.edu.tw)
Received: (from wkwu@localhost)
	by ccbsd1.csie.nctu.edu.tw (8.11.2/8.11.2) id f29CLg801777;
	Fri, 9 Mar 2001 20:21:42 +0800 (CST)
	(envelope-from wkwu)
Message-Id: <200103091221.f29CLg801777@ccbsd1.csie.nctu.edu.tw>
Date: Fri, 9 Mar 2001 20:21:42 +0800 (CST)
From: Wei-Kai Wu <wkwu@ccbsd1.csie.nctu.edu.tw>
Reply-To: wkwu@ccbsd1.csie.nctu.edu.tw
To: FreeBSD-gnats-submit@freebsd.org
Subject: lpr -# problem
X-Send-Pr-Version: 3.2

>Number:         25635
>Category:       misc
>Synopsis:       lpr -# didn't work on network printer
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gad
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 09 08:50:01 PST 2001
>Closed-Date:    Sun Apr 28 17:21:51 PDT 2002
>Last-Modified:  Sun Apr 28 17:21:51 PDT 2002
>Originator:     Wei-Kai Wu
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
Kavalan
>Environment:

OS:FreeBSD 4.2
Printer: HP 4050 with network printer device

>Description:

lpr -#2 -Php4050 test.ps
the above command will print only one copy of test.ps

the lpr -# only works with printers which connect by lpt

>How-To-Repeat:

It is trivial.

>Fix:

Modify the lpd source?
>Release-Note:
>Audit-Trail:

From: Peter Pentchev <roam@orbitel.bg>
To: Wei-Kai Wu <wkwu@ccbsd1.csie.nctu.edu.tw>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: misc/25635: lpr -# problem
Date: Fri, 9 Mar 2001 18:56:28 +0200

 Hmm.. could this be somehow related to PR bin/25544?
 ( http://www.FreeBSD.org/cgi-bin/query-pr.cgi?pr=25544 )
 Maybe the lpr source should be combed for more such problems?
 
 G'luck,
 Peter
 
 -- 
 If I were you, who would be reading this sentence?
 
 On Fri, Mar 09, 2001 at 08:21:42PM +0800, Wei-Kai Wu wrote:
 > 
 > >Number:         25635
 > >Category:       misc
 > >Synopsis:       lpr -# didn't work on network printer
 > >Originator:     Wei-Kai Wu
 > >Release:        FreeBSD 4.2-STABLE i386
 > >Organization:
 > Kavalan
 > >Environment:
 > 
 > OS:FreeBSD 4.2
 > Printer: HP 4050 with network printer device
 > 
 > >Description:
 > 
 > lpr -#2 -Php4050 test.ps
 > the above command will print only one copy of test.ps
 > 
 > the lpr -# only works with printers which connect by lpt

From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To: wkwu@ccbsd1.csie.nctu.edu.tw
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: misc/25635: lpr -# problem
Date: Fri, 9 Mar 2001 12:17:06 -0500 (EST)

 <<On Fri, 9 Mar 2001 20:21:42 +0800 (CST), Wei-Kai Wu <wkwu@ccbsd1.csie.nctu.edu.tw> said:
 
 > Printer: HP 4050 with network printer device
 
 The `-#' option requires support from the remote print spooler to
 operate.  Are you certain that this printer (I assume you're using an
 HP JetDirect or similar product) supports such a feature?  Many
 network print servers do not, in order to reduce the amount of memory
 required.
 
 -GAWollman
 

From: "Wei-Kai" <wkwu@csie.nctu.edu.tw>
To: "Garrett Wollman" <wollman@khavrinen.lcs.mit.edu>
Cc: <FreeBSD-gnats-submit@freebsd.org>
Subject: Re: misc/25635: lpr -# problem
Date: Sat, 10 Mar 2001 11:58:12 +0800

 We do not have JetAdmin binaries for FreeBSD.
 I have contacted with HP, but they told me that Jetadmin only support for
 Solaris, HPUX and Linux. Because we have to do accounting, without JetAdmin,
 I don't know how to get the message from printer such as how many pages have
 been printed.
 Any solution? or anybody can help me get the JetAdmin binaries?
 
 Still, lpr -# problem has no idea.
 
 ----- Original Message -----
 From: "Garrett Wollman" <wollman@khavrinen.lcs.mit.edu>
 To: <wkwu@ccbsd1.csie.nctu.edu.tw>
 Cc: <FreeBSD-gnats-submit@FreeBSD.ORG>
 Sent: Saturday, March 10, 2001 1:17 AM
 Subject: misc/25635: lpr -# problem
 
 
 > <<On Fri, 9 Mar 2001 20:21:42 +0800 (CST), Wei-Kai Wu
 <wkwu@ccbsd1.csie.nctu.edu.tw> said:
 > > Printer: HP 4050 with network printer device
 > The `-#' option requires support from the remote print spooler to
 > operate.  Are you certain that this printer (I assume you're using an
 > HP JetDirect or similar product) supports such a feature?  Many
 > network print servers do not, in order to reduce the amount of memory
 > required.
 

From: Garance A Drosihn <drosih@rpi.edu>
To: freebsd-gnats-submit@FreeBSD.org, wkwu@ccbsd1.csie.nctu.edu.tw
Cc: Peter Pentchev <roam@orbitel.bg>, freebsd-print@bostonradio.org
Subject: Re: misc/25635: lpr -# didn't work on network printer
Date: Mon, 12 Mar 2001 21:24:34 -0500

 Peter Pentchev <roam@orbitel.bg> wrote:
 >   Hmm.. could this be somehow related to PR bin/25544?
 
 The problem with multiple copies can not be related to
 the PR about lprm not working right.
 
 Wei-Kai Wu <wkwu@ccbsd1.csie.nctu.edu.tw> wrote:
 >   lpr -#2 -Php4050 test.ps
 >   the above command will print only one copy of test.ps
 
 What does your printcap entry look like?  Do you, for
 instance, do anything with a filter (if=blah) on this
 print queue?
 
 Garrett Wollman <wollman@khavrinen.lcs.mit.edu> wrote:
 >  The `-#' option requires support from the remote print
 >  spooler to operate.  Are you certain that this printer
 >  supports such a feature?  Many network print servers do
 >  not, in order to reduce the amount of memory required.
 
 I don't know about an HP 4050, but I did just try this on
 an HP 5000 series.  If you send a plain-text job via lpd
 protocols, then you will only get a single copy.  I also
 tested by pointing the exact same queue at a freebsd box,
 and the control file sent by the print server was correct.
 Ie, the control file does request the same number of copies
 that the user originally requested.
 
 My guess is that the HP printer ignores most of the lines
 in a control file.
 
 I only tried this with 'rp=lp', I don't know how it would
 behave for other queues that an HP might understand.
 
 Still, I suppose 'lpd' could fix this, by having an option
 to say "if the user requested multiple copies, then send
 each datafile to the remote host multiple times".  Not
 the most exciting option, but it is probably doable.  I
 will try to remember this issue, but I don't have any
 immediate plans to implement such an option.
 
 -- 
 Garance Alistair Drosehn            =   gad@eclipse.acs.rpi.edu
 Senior Systems Programmer           or  gad@freebsd.org
 Rensselaer Polytechnic Institute    or  drosih@rpi.edu

From: Wei-Kai Wu <wkwu@ccbsd1.csie.nctu.edu.tw>
To: Garance A Drosihn <drosih@rpi.edu>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/25635: lpr -# didn't work on network printer
Date: Tue, 13 Mar 2001 13:31:35 +0800

 On Mon, Mar 12, 2001 at 09:24:34PM -0500, Garance A Drosihn wrote:
 > What does your printcap entry look like?  Do you, for
 > instance, do anything with a filter (if=blah) on this
 > print queue?
 
 I think our filter did nothing about multiple copies.
 
 > protocols, then you will only get a single copy.  I also
 > tested by pointing the exact same queue at a freebsd box,
 > and the control file sent by the print server was correct.
 > Ie, the control file does request the same number of copies
 > that the user originally requested.
 
 I check the control file, it just create as n lines as you specify -#n:
 
 fdfA339server
 fdfA339server
 
 You mean this?
 
 > Still, I suppose 'lpd' could fix this, by having an option
 > to say "if the user requested multiple copies, then send
 > each datafile to the remote host multiple times".  Not
 > the most exciting option, but it is probably doable.  I
 > will try to remember this issue, but I don't have any
 > immediate plans to implement such an option.
 
 I have a dirty solution (modify the lpr.c):
 
 fdfA339server
 UdfA339server
 Nhosts
 fdfA339server
 UdfA339server
 Nhosts
 
 But it only works when you print by lpr on server.
 If I print by exact the same lpr on client (rm=server),
 it will failed sending jobs to server.
 
 -- 
  ߥqjǸTu{s Wei-Kai Wu
  E-mail: wkwu@csie.nctu.edu.tw  Lab: 03-5712121-54743 (EC119)

From: Garance A Drosihn <drosih@rpi.edu>
To: Wei-Kai Wu <wkwu@ccbsd1.csie.nctu.edu.tw>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/25635: lpr -# didn't work on network printer
Date: Mon, 19 Mar 2001 14:44:39 -0500

 At 1:31 PM +0800 3/13/01, Wei-Kai Wu wrote:
 >?On Mon, Mar 12, 2001 at 09:24:34PM -0500, Garance A Drosihn wrote:
 >>  What does your printcap entry look like?  Do you, for
 >>  instance, do anything with a filter (if=blah) on this
 >>  print queue?
 >
 >I think our filter did nothing about multiple copies.
 
 I'll continue this discussion on the freebsd-print mailing
 list, instead of in the PR database (via freebsd-gnats)...
 
 -- 
 Garance Alistair Drosehn            =   gad@eclipse.acs.rpi.edu
 Senior Systems Programmer           or  gad@freebsd.org
 Rensselaer Polytechnic Institute    or  drosih@rpi.edu
Responsible-Changed-From-To: freebsd-bugs->gad 
Responsible-Changed-By: gad 
Responsible-Changed-When: Thu May 24 16:42:30 PDT 2001 
Responsible-Changed-Why:  
I have been looking into this. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=25635 

From: Garance A Drosehn <gad@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org, wkwu@ccbsd1.csie.nctu.edu.tw
Cc:  
Subject: Re: misc/25635: lpr -# didn't work on network printer
Date: Tue, 2 Apr 2002 22:44:53 -0500

 I thought I would add an update to this PR.  I am almost ready with a 
 change to add 'rc' as a new option for printcap files, aka 
 'remote.resend_copies'.  If you have a printer which seems to ignore the 
 normal multiple-copy handling, you can include this option and lpd will 
 send the entire file the right number of times to that printer.
 
 I have a simple version of this update already, but I need to improve 
 that so it will work better when the queue is also using input or output 
 filters.  I hope to have the improved update installed in current in a 
 week or so, and will have it in stable a week later.
 
 ---
 Garance Alistair Drosehn     =      gad@gilead.acs.rpi.edu
 Senior Systems Programmer           or     gad@FreeBSD.org
 Rensselaer Polytechnic Institute;           Troy NY    USA
 
State-Changed-From-To: open->closed 
State-Changed-By: gad 
State-Changed-When: Sun Apr 28 17:18:43 PDT 2002 
State-Changed-Why:  
The new option of 'rc' aka 'remote.resend_copies' can be used to address 
this behavior of some network printers.  The 'rc' option is now available 
in both freebsd-current and freebsd-stable ... in time for 4.6-release. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=25635 
>Unformatted:
