Re: Cups, Gutenprint, and Plain Text

2016-01-02 Thread John Hasler
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 
jhas...@newsguy.com
Elmwood, WI USA



Cups, Gutenprint, and Plain Text

2016-01-02 Thread John Hasler
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 " < 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 
jhas...@newsguy.com
Elmwood, WI USA



Re: Cups, Gutenprint, and Plain Text

2016-01-02 Thread John Hasler
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 
jhas...@newsguy.com
Elmwood, WI USA



Re: Cups, Gutenprint, and Plain Text

2016-01-02 Thread John Hasler
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  -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 

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  -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 
jhas...@newsguy.com
Elmwood, WI USA



Re: Cups, Gutenprint, and Plain Text

2016-01-02 Thread Patrick Wiseman
On Sat, Jan 2, 2016 at 11:16 AM, 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
>

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

Patrick


Re: Cups, Gutenprint, and Plain Text

2016-01-02 Thread John Hasler
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 
jhas...@newsguy.com
Elmwood, WI USA



Re: Cups, Gutenprint, and Plain Text

2016-01-02 Thread Brian
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  -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?



Re: Cups, Gutenprint, and Plain Text

2016-01-02 Thread Brian
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 " < 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.



Re: Cups, Gutenprint, and Plain Text

2016-01-02 Thread Brian
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  -E -m drv:///sample.drv/generic.ppd

Print with

  lp -d HP5M-test1 

You could also try

  lpadmin -p HP5M-test2 -v  -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.



Re: Cups, Gutenprint, and Plain Text

2016-01-02 Thread John Hasler
I wrote:
> I don't get the resolution that the printer is capable of.

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