public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Printing: CUPS and HP LaserJet on JetDirect
@ 2002-08-29 15:32 Denis Shcherbakov
  2002-08-29 16:36 ` Marko Mikulicic
  2002-09-01 21:05 ` [gentoo-dev] Printing: CUPS and HP LaserJet Pierre-Henri Jondot
  0 siblings, 2 replies; 8+ messages in thread
From: Denis Shcherbakov @ 2002-08-29 15:32 UTC (permalink / raw
  To: gentoo-dev, gentoo-user

I have spent a few days trying to get my Gentoo box to print with CUPS, on
a remote network HP LeserJet 4M printer, sitting on a JetDirect interface.
I have tried every possible tweak of my cups and xinetd config files
(there was a recommendation to emerge and configure xinetd in order to get
CUPS working on Gentoo):  tried both CUPS and GIMP-PRINT *.ppd drivers for
this printer.  Every time I tried to print a test page from the web admin
tool for cups, I had the same output:  job cancelled at <time>.   If I
tried to re-activate the job, I got "Error: client-error-not-possible".

Then I got a tip from Donny Davies (a Gentoo Developer), who forwarded to
me Jeffrey D. Kowing's message regarding this matter in [gentoo-dev],
where he says that getting a fresh *.ppd from sourceforge.net solves the
problem.  So I went to sourceforge and got a PPD file for my HP LasetJet
4M, which is generated as HP-LaserJet_4M-ljet4-ppd.ppd, put it into my
/usr/share/cups/model/ with all other PPD's, deleted my current printers
and ran from the commandline (for JetDirect)

/usr/sbin/lpadmin -p printer_name -E -v socket://printer_IP:9100 -m
HP-LaserJet_4M-ljet4-ppd.ppd

restarted cups and xinetd just in case

/etc/init.d/cupsd restart
/etc/init.d/xinetd restart

checked if the printer is up, enabled, and accepting jobs

lpstat -p -d -o

and sent it a job

lp some_file.ps

And it worked like a charm.  The only thing I wasn't able to understand is
why it generated two empty sheets of paper before the job comes out, but
hey - it's recyclable :))

I hope this helps SOMEone.  Please email if you need something clarified,
since I spent like 3 days on this particular issue.

Denis



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Printing: CUPS and HP LaserJet on JetDirect
  2002-08-29 15:32 [gentoo-dev] Printing: CUPS and HP LaserJet on JetDirect Denis Shcherbakov
@ 2002-08-29 16:36 ` Marko Mikulicic
  2002-09-01 21:05 ` [gentoo-dev] Printing: CUPS and HP LaserJet Pierre-Henri Jondot
  1 sibling, 0 replies; 8+ messages in thread
From: Marko Mikulicic @ 2002-08-29 16:36 UTC (permalink / raw
  To: Denis Shcherbakov; +Cc: gentoo-dev, gentoo-user

Denis Shcherbakov wrote:

> Then I got a tip from Donny Davies (a Gentoo Developer), who forwarded to
> me Jeffrey D. Kowing's message regarding this matter in [gentoo-dev],
> where he says that getting a fresh *.ppd from sourceforge.net solves the
> problem.  So I went to sourceforge and got a PPD file for my HP LasetJet
> 4M, which is generated as HP-LaserJet_4M-ljet4-ppd.ppd, put it into my
> /usr/share/cups/model/ with all other PPD's, deleted my current printers
> and ran from the commandline (for JetDirect)

I download ppds from linuxprinting.org and never had any problems
with postscript laserjets (4M is postscript, isn't it?)
  Commandline printer installation and kdeprint installation allows to 
load a ppd from a file.

> 
> /usr/sbin/lpadmin -p printer_name -E -v socket://printer_IP:9100 -m
> HP-LaserJet_4M-ljet4-ppd.ppd
> 
> restarted cups and xinetd just in case
> 
> /etc/init.d/cupsd restart
> /etc/init.d/xinetd restart

why xinetd ?
cups-lpd is needed only if your server needs to
accept old lpd request from remote hosts.
  If you can run cups on all your workstations I suggest to
disable lpd compatibility.
  LPD must die!  :-)
(quoting a cups developer)

> 
> checked if the printer is up, enabled, and accepting jobs
> 
> lpstat -p -d -o
> 
> and sent it a job
> 
> lp some_file.ps
> 
> And it worked like a charm.  The only thing I wasn't able to understand is
> why it generated two empty sheets of paper before the job comes out, but
> hey - it's recyclable :))

I've readed that some accounting code in some old ppd
generates empty sheets.
Maybe you could try to use the generated ppd from ppd-o-matic at
linuxprinting.org.

Marko




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Printing: CUPS and HP LaserJet
  2002-08-29 15:32 [gentoo-dev] Printing: CUPS and HP LaserJet on JetDirect Denis Shcherbakov
  2002-08-29 16:36 ` Marko Mikulicic
@ 2002-09-01 21:05 ` Pierre-Henri Jondot
  2002-09-01 21:07   ` Marko Mikulicic
  1 sibling, 1 reply; 8+ messages in thread
From: Pierre-Henri Jondot @ 2002-09-01 21:05 UTC (permalink / raw
  To: gentoo-dev

> Then I got a tip from Donny Davies (a Gentoo Developer), who forwarded to
> me Jeffrey D. Kowing's message regarding this matter in [gentoo-dev],
> where he says that getting a fresh *.ppd from sourceforge.net solves the
> problem.  So I went to sourceforge and got a PPD file for my HP LasetJet
> 4M, which is generated as HP-LaserJet_4M-ljet4-ppd.ppd, put it into my
> /usr/share/cups/model/ with all other PPD's, deleted my current printers
> and ran from the commandline (for JetDirect)
> 
did it too...

> And it worked like a charm.  The only thing I wasn't able to understand is
> why it generated two empty sheets of paper before the job comes out, but
> hey - it's recyclable :))
> 
the same for me (not for every print but certainly for some) and my laserjet
5l, and it really annoys me... The more often I only print a page or two...

I parsed the ppd file without having the slightest idea of what to adjust...
When manually invoking ghostscript, I've never encountered this problem. A
fix would be greatly appreciated there...

-- 
Pierre-Henri Jondot <Pierre-Henri.Jondot@wanadoo.fr>
Page perso : http://perso.wanadoo.fr/phj


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Printing: CUPS and HP LaserJet
  2002-09-01 21:05 ` [gentoo-dev] Printing: CUPS and HP LaserJet Pierre-Henri Jondot
@ 2002-09-01 21:07   ` Marko Mikulicic
  2002-09-02  0:23     ` Pierre-Henri Jondot
  2002-09-24 18:55     ` [gentoo-dev] Avoiding blank pages with cups (was Printing: CUPS and HP LaserJet) Pierre-Henri Jondot
  0 siblings, 2 replies; 8+ messages in thread
From: Marko Mikulicic @ 2002-09-01 21:07 UTC (permalink / raw
  To: Pierre-Henri Jondot; +Cc: gentoo-dev

Pierre-Henri Jondot wrote:
>>Then I got a tip from Donny Davies (a Gentoo Developer), who forwarded to
>>me Jeffrey D. Kowing's message regarding this matter in [gentoo-dev],
>>where he says that getting a fresh *.ppd from sourceforge.net solves the
>>problem.  So I went to sourceforge and got a PPD file for my HP LasetJet
>>4M, which is generated as HP-LaserJet_4M-ljet4-ppd.ppd, put it into my
>>/usr/share/cups/model/ with all other PPD's, deleted my current printers
>>and ran from the commandline (for JetDirect)
>>
> 
> did it too...
> 
> 
>>And it worked like a charm.  The only thing I wasn't able to understand is
>>why it generated two empty sheets of paper before the job comes out, but
>>hey - it's recyclable :))
>>
> 
> the same for me (not for every print but certainly for some) and my laserjet
> 5l, and it really annoys me... The more often I only print a page or two...
> 
> I parsed the ppd file without having the slightest idea of what to adjust...
> When manually invoking ghostscript, I've never encountered this problem. A
> fix would be greatly appreciated there...
> 

have you tried to download the PPD from linuxprinting.org ?
There are a couple of "drivers" available for HP ljet:

ljet4
hpijs
gimp-print
gimp-print-ijs (emerge hpijs ...)

I didn't try with HP 5L  but it helped Denis. (which has a postscript 
printer)

Denis Shcherbakov wrote: (
 > I installed it now, tried it - it works beautifully, and the empty pages
 > are gone!!

Marko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Printing: CUPS and HP LaserJet
  2002-09-02  0:23     ` Pierre-Henri Jondot
@ 2002-09-01 21:59       ` Marko Mikulicic
  2002-09-02 15:47         ` Pierre-Henri Jondot
  0 siblings, 1 reply; 8+ messages in thread
From: Marko Mikulicic @ 2002-09-01 21:59 UTC (permalink / raw
  To: Pierre-Henri Jondot; +Cc: gentoo-dev

Pierre-Henri Jondot wrote:
> On Sun, 01 Sep 2002 23:07:47 +0200
> Marko Mikulicic <marko@seul.org> wrote:
> 
> 
> 
>>have you tried to download the PPD from linuxprinting.org ?
>>There are a couple of "drivers" available for HP ljet:
>>
>>ljet4
> 
> 
> ljet4 should be the best ghostscript driver (anyway that's the one I use
> when invoking ghostscript manually and it works fine) for my printer.
> 
> The ppd has already been obtained from linuxprinting.org, starting with
>  ljet4 driver and choosing hp laserjet 5l in the provided list.(PPD-O-Matic)
> 

Of course, ljet4 is the reccomended choice. However it seems
that some accounting code in some PPDs outputs blank pages.
(I've readed that the cups mailing list)
PPDs have chunks of postscript code executing in ghostscript before
it renders the page (using the ljet4 driver). These postscript code 
snippets have
a bug somewhere; this is why it works when the document
is manually feeded into ghostscript.
  I didn't have time to investatgate deeper.

I've already noticed this problem with ljet4 based PPDs. Maybe
you could temporary switch to another driver (hpijs for instance)
to avoid annoying wasting of paper.

Marko



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Printing: CUPS and HP LaserJet
  2002-09-01 21:07   ` Marko Mikulicic
@ 2002-09-02  0:23     ` Pierre-Henri Jondot
  2002-09-01 21:59       ` Marko Mikulicic
  2002-09-24 18:55     ` [gentoo-dev] Avoiding blank pages with cups (was Printing: CUPS and HP LaserJet) Pierre-Henri Jondot
  1 sibling, 1 reply; 8+ messages in thread
From: Pierre-Henri Jondot @ 2002-09-02  0:23 UTC (permalink / raw
  To: gentoo-dev

On Sun, 01 Sep 2002 23:07:47 +0200
Marko Mikulicic <marko@seul.org> wrote:


> have you tried to download the PPD from linuxprinting.org ?
> There are a couple of "drivers" available for HP ljet:
> 
> ljet4

ljet4 should be the best ghostscript driver (anyway that's the one I use
when invoking ghostscript manually and it works fine) for my printer.

The ppd has already been obtained from linuxprinting.org, starting with
 ljet4 driver and choosing hp laserjet 5l in the provided list.(PPD-O-Matic)

-- 
Pierre-Henri Jondot <Pierre-Henri.Jondot@wanadoo.fr>
Page perso : http://perso.wanadoo.fr/phj


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Printing: CUPS and HP LaserJet
  2002-09-01 21:59       ` Marko Mikulicic
@ 2002-09-02 15:47         ` Pierre-Henri Jondot
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre-Henri Jondot @ 2002-09-02 15:47 UTC (permalink / raw
  To: Marko Mikulicic; +Cc: gentoo-dev

On Sun, 01 Sep 2002 23:59:21 +0200
Marko Mikulicic <marko@seul.org> wrote:

> 
> Of course, ljet4 is the reccomended choice. However it seems
> that some accounting code in some PPDs outputs blank pages.
> (I've readed that the cups mailing list)
> PPDs have chunks of postscript code executing in ghostscript before
> it renders the page (using the ljet4 driver). These postscript code 
> snippets have
> a bug somewhere; this is why it works when the document
> is manually feeded into ghostscript.
>   I didn't have time to investatgate deeper.

> I've already noticed this problem with ljet4 based PPDs. Maybe
> you could temporary switch to another driver (hpijs for instance)
> to avoid annoying wasting of paper.
> 
Just tried it... Didn't work (hpijs) : doesn't print at all, the printer
goes into error mode... (I did emerge hpijs).

Right now, I stick with ljet4. (Didn't try gimp-print, but do remember from
previous linux installations the printing was much sharper with ljet4 driver
than with gimp-print. I'll give it a try later.)

Thanks,
-- 
Pierre-Henri Jondot <Pierre-Henri.Jondot@wanadoo.fr>
Page perso : http://perso.wanadoo.fr/phj


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-dev] Avoiding blank pages with cups (was Printing: CUPS and HP LaserJet)
  2002-09-01 21:07   ` Marko Mikulicic
  2002-09-02  0:23     ` Pierre-Henri Jondot
@ 2002-09-24 18:55     ` Pierre-Henri Jondot
  1 sibling, 0 replies; 8+ messages in thread
From: Pierre-Henri Jondot @ 2002-09-24 18:55 UTC (permalink / raw
  To: gentoo-dev

On Sun, 01 Sep 2002 23:07:47 +0200
Marko Mikulicic <marko@seul.org> wrote:

> >>me Jeffrey D. Kowing's message regarding this matter in [gentoo-dev],
> >>where he says that getting a fresh *.ppd from sourceforge.net solves the
> >>problem.  So I went to sourceforge and got a PPD file for my HP LasetJet
> >>4M, which is generated as HP-LaserJet_4M-ljet4-ppd.ppd, put it into my
> >>/usr/share/cups/model/ with all other PPD's, deleted my current printers
> >>and ran from the commandline (for JetDirect)
> >>
> > 
> > did it too...
> > 
> > 
> >>And it worked like a charm.  The only thing I wasn't able to understand
> >is>why it generated two empty sheets of paper before the job comes out,
> >but>hey - it's recyclable :))

> Marko
> 

Just found this googleing : 
http://www.linuxprinting.org/pipermail/foomatic-devel/2002q3/000874.html

A short quote of this text is :
----------------------------------------------
if not, edit /usr/lib/cups/filter/cupsomatic replacing the line "my
ps_accounting = 1;" by "my ps_accounting = 0;". Now your file should
print without problems.
----------------------------------------------
Did it and now, I do not waste any more paper with blank pages.

The article do propose a patch too if accounting is needed... Didn't try it
and don't know if it would be advisable to modify the cups ebuild to apply
this patch.

For my part, I'm happy with this very simple fix.

Hope this helps,
-- 
Pierre-Henri Jondot <Pierre-Henri.Jondot@wanadoo.fr>
Page perso : http://perso.wanadoo.fr/phj


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-09-24 16:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-29 15:32 [gentoo-dev] Printing: CUPS and HP LaserJet on JetDirect Denis Shcherbakov
2002-08-29 16:36 ` Marko Mikulicic
2002-09-01 21:05 ` [gentoo-dev] Printing: CUPS and HP LaserJet Pierre-Henri Jondot
2002-09-01 21:07   ` Marko Mikulicic
2002-09-02  0:23     ` Pierre-Henri Jondot
2002-09-01 21:59       ` Marko Mikulicic
2002-09-02 15:47         ` Pierre-Henri Jondot
2002-09-24 18:55     ` [gentoo-dev] Avoiding blank pages with cups (was Printing: CUPS and HP LaserJet) Pierre-Henri Jondot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox