Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #162472 > unrolled thread

Cups, Gutenprint, and Plain Text

Started byJohn Hasler <jhasler@newsguy.com>
First post2016-01-02 17:20 +0100
Last post2016-01-02 21:10 +0100
Articles 11 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  Cups, Gutenprint, and Plain Text John Hasler <jhasler@newsguy.com> - 2016-01-02 17:20 +0100
    Re: Cups, Gutenprint, and Plain Text Patrick Wiseman <pwiseman@gmail.com> - 2016-01-02 17:40 +0100
      Re: Cups, Gutenprint, and Plain Text John Hasler <jhasler@newsguy.com> - 2016-01-02 18:20 +0100
    Re: Cups, Gutenprint, and Plain Text Brian <ad44@cityscape.co.uk> - 2016-01-02 18:10 +0100
      Re: Cups, Gutenprint, and Plain Text John Hasler <jhasler@newsguy.com> - 2016-01-02 19:00 +0100
        Re: Cups, Gutenprint, and Plain Text Brian <ad44@cityscape.co.uk> - 2016-01-02 19:50 +0100
          Re: Cups, Gutenprint, and Plain Text John Hasler <jhasler@newsguy.com> - 2016-01-02 20:40 +0100
            Re: Cups, Gutenprint, and Plain Text deloptes <deloptes@yahoo.com> - 2016-01-02 21:00 +0100
              Re: Cups, Gutenprint, and Plain Text John Hasler <jhasler@newsguy.com> - 2016-01-02 21:30 +0100
                Re: Cups, Gutenprint, and Plain Text John Hasler <jhasler@newsguy.com> - 2016-01-02 21:50 +0100
            Re: Cups, Gutenprint, and Plain Text Brian <ad44@cityscape.co.uk> - 2016-01-02 21:10 +0100

#162472 — Cups, Gutenprint, and Plain Text

FromJohn Hasler <jhasler@newsguy.com>
Date2016-01-02 17:20 +0100
SubjectCups, Gutenprint, and Plain Text
Message-ID<qMx4m-1Tw-5@gated-at.bofh.it>
Ok, I installed Cups+Gutenprint on my server because Magicfilter doesn't
support my "new" printer.  After a struggle I have it printing pdfs both
locally and remotely.

Plain text, however, is too much for it.  With Magicfilter I just typed
"lpr filename" and everything just worked, whether the file was plain
text or pdf.  With Cups "lp filename" (lpr is gone) works fine for a pdf
but with plain text gives a gray bar at the top of the page.  "lp -o raw
filename" is too raw: no carriage returns.  There are various filters,
of course, but I can't ask my wife to type "<filter> < filename | lp"
for plain text and "lp filename" for pdfs.  How do I get cups to do what
Magicfilter does "magically"?  Surely this is a solved problem.
-- 
John Hasler 
jhasler@newsguy.com
Elmwood, WI USA

[toc] | [next] | [standalone]


#162477

FromPatrick Wiseman <pwiseman@gmail.com>
Date2016-01-02 17:40 +0100
Message-ID<qMxnI-20F-15@gated-at.bofh.it>
In reply to#162472

[Multipart message — attachments visible in raw view] — view raw

On Sat, Jan 2, 2016 at 11:16 AM, John Hasler <jhasler@newsguy.com> wrote:

> Ok, I installed Cups+Gutenprint on my server because Magicfilter doesn't
> support my "new" printer.  After a struggle I have it printing pdfs both
> locally and remotely.
>
> Plain text, however, is too much for it.  With Magicfilter I just typed
> "lpr filename" and everything just worked, whether the file was plain
> text or pdf.  With Cups "lp filename" (lpr is gone) works fine for a pdf
>

Not that this is responsive to your question, but cups-bsd supplies
/usr/bin/lpr

Patrick

[toc] | [prev] | [next] | [standalone]


#162483

FromJohn Hasler <jhasler@newsguy.com>
Date2016-01-02 18:20 +0100
Message-ID<qMy0q-2tx-19@gated-at.bofh.it>
In reply to#162477
Patrick Wiseman writes:
> Not that this is responsive to your question, but cups-bsd supplies
> /usr/bin/lpr

Thank you.  The lack of an lpr command on the server is not important,
though.
-- 
John Hasler 
jhasler@newsguy.com
Elmwood, WI USA

[toc] | [prev] | [next] | [standalone]


#162478

FromBrian <ad44@cityscape.co.uk>
Date2016-01-02 18:10 +0100
Message-ID<qMxQK-2qa-15@gated-at.bofh.it>
In reply to#162472
On Sat 02 Jan 2016 at 10:16:27 -0600, John Hasler wrote:

> Ok, I installed Cups+Gutenprint on my server because Magicfilter doesn't
> support my "new" printer.  After a struggle I have it printing pdfs both
> locally and remotely.
> 
> Plain text, however, is too much for it.  With Magicfilter I just typed
> "lpr filename" and everything just worked, whether the file was plain
> text or pdf.  With Cups "lp filename" (lpr is gone) works fine for a pdf
> but with plain text gives a gray bar at the top of the page.  "lp -o raw
> filename" is too raw: no carriage returns.  There are various filters,
> of course, but I can't ask my wife to type "<filter> < filename | lp"
> for plain text and "lp filename" for pdfs.  How do I get cups to do what
> Magicfilter does "magically"?  Surely this is a solved problem.

The printer name and model would be useful to know; as would the PPD
presently being used.

There is no difference in using lp or lpr.

[toc] | [prev] | [next] | [standalone]


#162492

FromJohn Hasler <jhasler@newsguy.com>
Date2016-01-02 19:00 +0100
Message-ID<qMyD9-2In-29@gated-at.bofh.it>
In reply to#162478
Brian writes:
> The printer name and model would be useful to know; as would the PPD
> presently being used.

It's a HP LaserJet 5MP connected to a parallel printer port.  Lpoptions
says "printer-make-and-model='HP LaserJet 5MP - CUPS+Gutenprint
v5.2.10'"

> There is no difference in using lp or lpr.

Yes.  That's unimportant.
-- 
John Hasler 
jhasler@newsguy.com
Elmwood, WI USA

[toc] | [prev] | [next] | [standalone]


#162493

FromBrian <ad44@cityscape.co.uk>
Date2016-01-02 19:50 +0100
Message-ID<qMzpw-3e8-19@gated-at.bofh.it>
In reply to#162492
On Sat 02 Jan 2016 at 11:49:44 -0600, John Hasler wrote:

> Brian writes:
> > The printer name and model would be useful to know; as would the PPD
> > presently being used.
> 
> It's a HP LaserJet 5MP connected to a parallel printer port.  Lpoptions
> says "printer-make-and-model='HP LaserJet 5MP - CUPS+Gutenprint
> v5.2.10'"

The question is whether the gray bar is an artifact produced by CUPS
(unlikely), by cups-filters (possible, but unlikely), the Gutenprint
driver (could be) or the printer (one never knows). Or it could be part
of the original file. We assume the file is something produced by a
text editor, vim etc.

Your printer is a PostScript printer. Obtain the URI of the parallel
port with

  lpstat -v

and set up a print queue with

  lpadmin -p HP5M-test1 -v <URI> -E -m drv:///sample.drv/generic.ppd

Print with

  lp -d HP5M-test1 <text_file>

You could also try

  lpadmin -p HP5M-test2 -v <URI> -E -m lsb/usr/cupsfilters/textonly.ppd

> > There is no difference in using lp or lpr.
> 
> Yes.  That's unimportant.

Not for the people who think there is a significant difference.

[toc] | [prev] | [next] | [standalone]


#162495

FromJohn Hasler <jhasler@newsguy.com>
Date2016-01-02 20:40 +0100
Message-ID<qMAbU-3Mt-7@gated-at.bofh.it>
In reply to#162493
Brian writes:
> The question is whether the gray bar is an artifact produced by CUPS
> (unlikely), by cups-filters (possible, but unlikely), the Gutenprint
> driver (could be) or the printer (one never knows). Or it could be
> part of the original file. We assume the file is something produced by
> a text editor, vim etc.

The file is:

qwertyuiop
asdfghjkl

Produced by vi.

> Your printer is a PostScript printer. Obtain the URI of the parallel
> port with
> lpstat -v

Ok:
toncho/~ lpstat -v
device for HPLJ5: parallel:/dev/lp0

> and set up a print queue with
>  lpadmin -p HP5M-test1 -v <URI> -E -m drv:///sample.drv/generic.ppd

Ok:
toncho/~ lpadmin -p HP5M-test1 -v parallel:/dev/lp0  -E -m drv:///sample.drv/generic.ppd

> Print with
>  lp -d HP5M-test1 <text_file>

Ok:
toncho/~ lp -d HP5M-test1 text
Second LED comes on, first LED blinks a few times, second LED goes off.
Nothing prints, though the Cups Web interface says it did.

> You could also try
> lpadmin -p HP5M-test2 -v <URI> -E -m lsb/usr/cupsfilters/textonly.ppd

Ok:
toncho/~ lpadmin -p HP5M-test2 -v parallel:/dev/lp0 -E -m lsb/usr/cupsfilters/textonly.ppd
toncho/~ lp -d HP5M-test2 text
Produces same result as above except that both LEDs stay on.

I wrote:
> There is no difference in using lp or lpr.
> ...
> Yes.  That's unimportant.

Brian writes:
> Not for the people who think there is a significant difference.

In this context it is unimportant.

The requirement is to type "lpr filename" on a workstation and have the
file print correctly regardless of whether it is a pdf or plain text.
Works now but only for pdfs.  I have no need to print directly from the
server: its function is to provide a parallel port.
-- 
John Hasler 
jhasler@newsguy.com
Elmwood, WI USA

[toc] | [prev] | [next] | [standalone]


#162497

Fromdeloptes <deloptes@yahoo.com>
Date2016-01-02 21:00 +0100
Message-ID<qMAvg-3Tb-1@gated-at.bofh.it>
In reply to#162495
John Hasler wrote:

I think I have read something about the MP series. I have the 5L at home in
use for the past 10+y.
There was a problem at some point of time with the cups 1.5 version but was
resolved later

So now I use following setup - I am not quite sure if it will apply to
yours.

Description:    HP LaserJet 5L
Location:       Local Printer
Driver: HP LaserJet 5L Foomatic/ljet4 (recommended) (grayscale, 2-sided
printing)
Connection:     usb://HP/LaserJet%205L
Defaults:       job-sheets=none, none media=iso_a4_210x297mm sides=one-sided


In fact I am not sure at all that it needs a kind of driver to print plain
ascii text. It should be supported by the printer in console mode.

I'm pretty happy with the foomatic driver.

I hope this helps

regards

[toc] | [prev] | [next] | [standalone]


#162501

FromJohn Hasler <jhasler@newsguy.com>
Date2016-01-02 21:30 +0100
Message-ID<qMAYi-4iu-1@gated-at.bofh.it>
In reply to#162497
On the workstation I used magicfilterconfig to set up the HPLJ5 on the
server as a remote printer using the "laserjet" filter.  lpr works
properly from the workstation now, though I don't get the resolution
that the printer is capable of.

Later I may rip out all the Cups stuff.
-- 
John Hasler 
jhasler@newsguy.com
Elmwood, WI USA

[toc] | [prev] | [next] | [standalone]


#162502

FromJohn Hasler <jhasler@newsguy.com>
Date2016-01-02 21:50 +0100
Message-ID<qMBhE-4oB-3@gated-at.bofh.it>
In reply to#162501
I wrote:
> I don't get the resolution that the printer is capable of.

Fixed by patching the filter.
-- 
John Hasler 
jhasler@newsguy.com
Elmwood, WI USA

[toc] | [prev] | [next] | [standalone]


#162499

FromBrian <ad44@cityscape.co.uk>
Date2016-01-02 21:10 +0100
Message-ID<qMAEW-4bL-13@gated-at.bofh.it>
In reply to#162495
On Sat 02 Jan 2016 at 13:34:15 -0600, John Hasler wrote:

> Brian writes:
> > The question is whether the gray bar is an artifact produced by CUPS
> > (unlikely), by cups-filters (possible, but unlikely), the Gutenprint
> > driver (could be) or the printer (one never knows). Or it could be
> > part of the original file. We assume the file is something produced by
> > a text editor, vim etc.
> 
> The file is:
> 
> qwertyuiop
> asdfghjkl
> 
> Produced by vi.

Simple enough to be confident it is a text file.

[Snip]

> Ok:
> toncho/~ lp -d HP5M-test1 text
> Second LED comes on, first LED blinks a few times, second LED goes off.
> Nothing prints, though the Cups Web interface says it did.

For why CUPS thinks it has done its job you would look at the error log,
It might also say why it doesn't print.

I'm a little surprised this didn't print. The print queue I suggested
can also be set up from the web interface at localhost:631.

> > You could also try
> > lpadmin -p HP5M-test2 -v <URI> -E -m lsb/usr/cupsfilters/textonly.ppd
> 
> Ok:
> toncho/~ lpadmin -p HP5M-test2 -v parallel:/dev/lp0 -E -m lsb/usr/cupsfilters/textonly.ppd
> toncho/~ lp -d HP5M-test2 text
> Produces same result as above except that both LEDs stay on.
> 
> I wrote:
> > There is no difference in using lp or lpr.
> > ...
> > Yes.  That's unimportant.
> 
> Brian writes:
> > Not for the people who think there is a significant difference.
> 
> In this context it is unimportant.

It is unimportant in any context. Why introduce it in the first place?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web