Discussion:
Bug#950690: cups-filters: Printing fails with an error about Grayscale/monochrome conversion
(too old to reply)
Yves-Alexis Perez
2020-02-04 21:20:01 UTC
Permalink
Package: cups-filters
Version: 1.27.0-2
Severity: important

Hi,

since “some” time (few weeks maybe, I guess the 1.27.0 upload), I can't
print on my Brother HL-5250DN network printer (which was working just
fine earlier).

The printer is laser monochrome, and I always was able to print color
and monochrome stuff, conversion was happening just fine.

Now, when I try to print, nothing happens and I guess an error in the
logs about:

W [04/Feb/2020:21:28:45 +0100] [Job 570] Grayscale/monochrome printing
requested for this job but Poppler is not able to convert to
grayscale/monochrome PostScript.
W [04/Feb/2020:21:28:45 +0100] [Job 570] Use \"pdftops-renderer\" option
(see README file) to use Ghostscript or MuPDF for the PDF -> PostScript
conversion.

First, it's really not obvious from the log *which* README this is
about, and I had to dig a little before finding it was the one from
cups-filters.

Then, I tried to set pdftops-renderer-default to various options (gs,
pdftocairo) using:

lpadmin -p printer -o pdftops-renderer-default=<foo>

but it didn't work.

With:

- gs: nothing prints, but nothing happens in the logs
- pdftocairo: same error message than without any option
- pdftops: same error

With mupdf it does send something to the printer but the results shows:

ERROR NAME;
undefined
COMMAND;
°
OPERAND STACK;

and in the logs I get:

W [04/Feb/2020:21:34:29 +0100] [Job 573] Level 3 PostScript not
supported by mutool.

Downgrading to 1.26.2 from testing seems to fix the problem (I still
have the log entry, though, it seems, so maybe it's unrelated).

Regards,

-- System Information:
Debian Release: bullseye/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (450, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cups-filters depends on:
ii bc 1.07.1-2+b2
ii cups-filters-core-drivers 1.27.0-2
ii ghostscript 9.50~dfsg-5
ii libc6 2.29-9
ii libcups2 2.3.1-4
ii libcupsfilters1 1.27.0-2
ii libfontconfig1 2.13.1-2+b1
ii libfontembed1 1.27.0-2
ii libgcc-s1 [libgcc1] 10-20200202-1
ii libgcc1 1:9.2.1-25
ii libqpdf26 9.1.1-1
ii libstdc++6 10-20200202-1
ii poppler-utils 0.71.0-6

Versions of packages cups-filters recommends:
ii colord 1.4.4-1
ii liblouis-bin 3.12.0-3
ii liblouisutdml-bin 2.8.0-3

Versions of packages cups-filters suggests:
pn antiword <none>
pn docx2txt <none>
pn foomatic-db-compressed-ppds | foomatic-db <none>
ii imagemagick 8:6.9.10.23+dfsg-2.1+b2
ii imagemagick-6.q16 [imagemagick] 8:6.9.10.23+dfsg-2.1+b2

-- Configuration Files:
/etc/modules-load.d/cups-filte
Brian Potkin
2020-02-05 16:10:01 UTC
Permalink
tags 950690 upstream
thanks
Post by Yves-Alexis Perez
Package: cups-filters
Version: 1.27.0-2
Severity: important
Hi,
since “some” time (few weeks maybe, I guess the 1.27.0 upload), I can't
print on my Brother HL-5250DN network printer (which was working just
fine earlier).
The printer is laser monochrome, and I always was able to print color
and monochrome stuff, conversion was happening just fine.
Now, when I try to print, nothing happens and I guess an error in the
W [04/Feb/2020:21:28:45 +0100] [Job 570] Grayscale/monochrome printing
requested for this job but Poppler is not able to convert to
grayscale/monochrome PostScript.
W [04/Feb/2020:21:28:45 +0100] [Job 570] Use \"pdftops-renderer\" option
(see README file) to use Ghostscript or MuPDF for the PDF -> PostScript
conversion.
First, it's really not obvious from the log *which* README this is
about, and I had to dig a little before finding it was the one from
cups-filters.
Then, I tried to set pdftops-renderer-default to various options (gs,
lpadmin -p printer -o pdftops-renderer-default=<foo>
but it didn't work.
- gs: nothing prints, but nothing happens in the logs
- pdftocairo: same error message than without any option
- pdftops: same error
ERROR NAME;
undefined
COMMAND;
°
OPERAND STACK;
W [04/Feb/2020:21:34:29 +0100] [Job 573] Level 3 PostScript not
supported by mutool.
Downgrading to 1.26.2 from testing seems to fix the problem (I still
have the log entry, though, it seems, so maybe it's unrelated).
Thank you for your report, Yves-Alexis.

Your issue seems connected with

https://github.com/OpenPrinting/cups-filters/issues/169

and its associated bugs. I take it you are using the PostScript
PPD provided by Brother. I did test how filtering went with it
and a file or two. I got no errors, but did get the warnings you
got. Then again, I do not have the printer to print the output
file to.

I am not sure I really understand all that is involved here, so,
because you are able to provide first-hand experience, suggest
you forward the issue upstream.

Regards,

Brian.
Yves-Alexis Perez
2020-02-05 16:30:02 UTC
Permalink
Post by Brian Potkin
Your issue seems connected with
https://github.com/OpenPrinting/cups-filters/issues/169
and its associated bugs.
When looking at the warning message in the logs I stumbled on that bug,
but didn't really find it really informative (especially since it's
closed while I still have the bug).
Post by Brian Potkin
I take it you are using the PostScript
PPD provided by Brother.
Not really sure, but I don't think so. I mean, I'm using the PPD file
from cups Debian packages, not anything from Brother.
Post by Brian Potkin
I did test how filtering went with it
and a file or two. I got no errors, but did get the warnings you
got. Then again, I do not have the printer to print the output
file to.
Not entirely sure what is your workflow here, but with some details
maybe I can try to reproduce what you did and see if something goes out
of the printer?
Post by Brian Potkin
I am not sure I really understand all that is involved here, so,
because you are able to provide first-hand experience, suggest
you forward the issue upstream.
Just to be sure: do you mean opening a new issue on upstream github, or
just commenting on the issue linked above?

Regards,
--
Yves-Alexis
Brian Potkin
2020-02-05 17:50:01 UTC
Permalink
Post by Yves-Alexis Perez
Post by Brian Potkin
Your issue seems connected with
https://github.com/OpenPrinting/cups-filters/issues/169
and its associated bugs.
When looking at the warning message in the logs I stumbled on that bug,
but didn't really find it really informative (especially since it's
closed while I still have the bug).
I think using gs as the renderer is regarded as the fix but, TBH, I got
a little lost when I started looking at the bugs linked from #169.
Post by Yves-Alexis Perez
Post by Brian Potkin
I take it you are using the PostScript
PPD provided by Brother.
Not really sure, but I don't think so. I mean, I'm using the PPD file
from cups Debian packages, not anything from Brother.
As root, what do you get for

grep "*NickName" /etc/cups/ppd/<your_5250_ppd>

Do you know the package name?
Post by Yves-Alexis Perez
Post by Brian Potkin
I did test how filtering went with it
and a file or two. I got no errors, but did get the warnings you
got. Then again, I do not have the printer to print the output
file to.
Not entirely sure what is your workflow here, but with some details
maybe I can try to reproduce what you did and see if something goes out
of the printer?
Later, certainly. I'd like to test with your PPD first.
Post by Yves-Alexis Perez
Post by Brian Potkin
I am not sure I really understand all that is involved here, so,
because you are able to provide first-hand experience, suggest
you forward the issue upstream.
Just to be sure: do you mean opening a new issue on upstream github, or
just commenting on the issue linked above?
Open a new issue referring to #169 and referencing the Debian report.

Regards,

Brian.
Brian Potkin
2020-02-05 18:10:01 UTC
Permalink
Post by Brian Potkin
Open a new issue referring to #169 and referencing the Debian report.
Sorry; I should have suggested leaving doing this until we both have had
the opportunity to test the filtering system.

Regards,

Brian.
Yves-Alexis Perez
2020-02-05 20:10:02 UTC
Permalink
Post by Brian Potkin
Post by Yves-Alexis Perez
Not really sure, but I don't think so. I mean, I'm using the PPD file
from cups Debian packages, not anything from Brother.
As root, what do you get for
grep "*NickName" /etc/cups/ppd/<your_5250_ppd>
*NickName: "Brother HL-5250DN BR-Script3"

The ppd is Copyright(C) 2005 Brother Industries, Ltd. so even if I have it
from Debian, it still comes from Brother.
Post by Brian Potkin
Do you know the package name?
Not really, but I's the one cups (either the web interface or system-config-
printer) shows me when using make & model.
Post by Brian Potkin
Post by Yves-Alexis Perez
Post by Brian Potkin
I did test how filtering went with it
and a file or two. I got no errors, but did get the warnings you
got. Then again, I do not have the printer to print the output
file to.
Not entirely sure what is your workflow here, but with some details
maybe I can try to reproduce what you did and see if something goes out
of the printer?
Later, certainly. I'd like to test with your PPD first.
Attached.
Post by Brian Potkin
Open a new issue referring to #169 and referencing the Debian report.
I saw your other mail so I'm postponing that. I'll also check the steps from
Till

Regards,
--
Yves-Alexis
Brian Potkin
2020-02-05 20:20:03 UTC
Permalink
Post by Yves-Alexis Perez
Post by Brian Potkin
Post by Yves-Alexis Perez
Not really sure, but I don't think so. I mean, I'm using the PPD file
from cups Debian packages, not anything from Brother.
As root, what do you get for
grep "*NickName" /etc/cups/ppd/<your_5250_ppd>
*NickName: "Brother HL-5250DN BR-Script3"
The ppd is Copyright(C) 2005 Brother Industries, Ltd. so even if I have it
from Debian, it still comes from Brother.
It is basically the same as the one I have from Brother.
Post by Yves-Alexis Perez
Post by Brian Potkin
Do you know the package name?
Not really, but I's the one cups (either the web interface or system-config-
printer) shows me when using make & model.
We'll let that go. It is something for me to sort out.
Post by Yves-Alexis Perez
Post by Brian Potkin
Post by Yves-Alexis Perez
Post by Brian Potkin
I did test how filtering went with it
and a file or two. I got no errors, but did get the warnings you
got. Then again, I do not have the printer to print the output
file to.
Not entirely sure what is your workflow here, but with some details
maybe I can try to reproduce what you did and see if something goes out
of the printer?
Later, certainly. I'd like to test with your PPD first.
Attached.
Thanks. I used it (as root) with

cupsfilter -p /etc/cups/ppd/<my_ppd> -m printer/foo -e /etc/nsswitch > out.ps 2>log

There aren't any errors in the log.

Regards,

Brian.
Till Kamppeter
2020-02-05 20:30:01 UTC
Permalink
I have tried it also and with the command line

cupsfilter -p ../HL5250DN.ppd -i text/plain -m
application/vnd.cups-postscript -e ~/.bashrc > out.ps 2>log

I got valid PostScript output with a PJL header. Note that I had to
specify both input and output MIME types.

Probably in the cases whenthe printer does not print CUPS sends valid
PJL and PostScript but some PostScript interpreter bug in the printer
prevents it from printing.

You can try to send the PostScript output of the command line above to
your printer without further filtering, either do

lp -d <Printer> -o raw out.ps

or

nc -w1 <printer IP> 9100 < out.ps

Please try.

Till
Yves-Alexis Perez
2020-02-05 20:10:02 UTC
Permalink
Probably the best is to try to print without using PostScript. When
creating a print queue and selecting your printer's make, model, and
driver manually, have a look at PCL 6/XL (pxlmono) or PCL 5e
(ljet4/ljet4d/hpcups/hpijs) options.
So, I'm even more confused. I've upgraded again cups-filters (to 1.27.0-2) in
order to do a comparison check, and tried to print, and it did work (with the
Brother PPD, unchanged).
Or try running the command
driverless
This doesn't return anything. My printer is on the network but I don't think
it advertises itself using Bonjour/zeroconf, so I'm unsure if it'd be enough
for that to find it.
- --
Yves-Alexis
Till Kamppeter
2020-02-05 20:40:01 UTC
Permalink
Post by Yves-Alexis Perez
So, I'm even more confused. I've upgraded again cups-filters (to 1.27.0-2) in
order to do a comparison check, and tried to print, and it did work (with the
Brother PPD, unchanged).
This looks strange, there is no change in the pdftops filter which could
have changed something before the last release.
Post by Yves-Alexis Perez
Or try running the command
driverless
This doesn't return anything. My printer is on the network but I don't think
it advertises itself using Bonjour/zeroconf, so I'm unsure if it'd be enough
for that to find it.
driverless printing is a rather new property in network printers. It
started some years ago with AirPrint to make iPhones be able to print
when connecting to the local network via the WLAN of the router.
Generally printers advertised to print from phones support at least one
form of driverless printing, AirPrint in most cases. Typically the
network printers launched in the last 5 years do driverless but your
printer can be older.

"driverless" lists all IPP printers which support driverless printing.

Till

Loading...