Bug 770880

Summary: poppler: Printing on PostScript printers no longer works (printer's PostScript error message "...setoverprintmode...")
Product: [openSUSE] openSUSE 12.2 Reporter: Petr Herynk <hepet>
Component: PrintingAssignee: Vincent Untz <vuntz>
Status: RESOLVED DUPLICATE QA Contact: Johannes Meixner <jsmeix>
Severity: Normal    
Priority: P5 - None CC: hepet, suse
Version: Beta 2   
Target Milestone: ---   
Hardware: All   
OS: openSUSE 12.2   
Whiteboard:
Found By: Community User Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: cups debug mode log file

Description Petr Herynk 2012-07-11 11:20:44 UTC
User-Agent:       Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120614 Firefox/13.0.1 SeaMonkey/2.10 Lightning/1.5.1

I have able to setup printer, which is running but no result. Page are blank.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Johannes Meixner 2012-07-11 12:27:56 UTC
http://en.opensuse.org/SDB:How_to_Report_a_Printing_Issue
Comment 2 Stanley Miller 2012-08-08 00:01:37 UTC
I'm seeing a couple different problems that seem to be keeping me from printing. I'll have to post once about each problem in order to keep my comments from confusing myself.

First when I try to set up the printer using a locally assigned name 'brother.home' I get the following error messages in the cups log and printing fails:

---------------
E [07/Aug/2012:16:51:33 -0700] Browsing=1
E [07/Aug/2012:16:51:33 -0700] BrowseLocalProtocols=0
E [07/Aug/2012:16:51:33 -0700] BrowseRemoteProtocols=1
E [07/Aug/2012:16:51:33 -0700] BROWSE_CUPS=1
E [07/Aug/2012:16:51:33 -0700] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.
-------------

Is this "[v1.::1]:631" the system trying to assign an IPv6 address for my printer? My local DNS server is not IPv6 enabled and I have turned off IPv6 in OpenSuse at the initial install and confirmed it is off in the Yast networking section.

I realize that RFC 2606 that suggested the use of .home has expired and I'm going to have to move to a different domain soon. http://tools.ietf.org/html/draft-chapin-rfc2606bis-00
Comment 3 Stanley Miller 2012-08-08 03:58:54 UTC
Trying this again with an IP address, 192.168.2.253 still shows the [v1.::1]:631 error so it wasn't the invalid domain name.

I'm at the point that I can print the test pages (cups and internal) from the cups admin web page and Yast will print the test page from the printer setup section but nothing will print from a program. I've tried Kwrite, Firefox, LibreOffice and all have failed.

Looking at the logs isn't helping me much here... If anyone knows what I should look for and possibly post here please let me know.

Cups error log from the admin web page:

E [07/Aug/2012:17:28:57 -0700] Browsing=1
E [07/Aug/2012:17:28:57 -0700] BrowseLocalProtocols=0
E [07/Aug/2012:17:28:57 -0700] BrowseRemoteProtocols=1
E [07/Aug/2012:17:28:57 -0700] BROWSE_CUPS=1
E [07/Aug/2012:17:28:57 -0700] Unable to bind socket for address [v1.::1]:631 - Cannot assign requested address.
E [07/Aug/2012:17:29:52 -0700] [Job 28] Unable to open print file: No such file or directory
E [07/Aug/2012:17:29:52 -0700] [Job 28] Unable to open print file: No such file or directory
E [07/Aug/2012:17:29:52 -0700] [Job 28] Unable to open print file: No such file or directory
E [07/Aug/2012:17:29:52 -0700] [Job 28] Unable to open print file: No such file or directory

Cups jobs from the admin web page:

Brother-31  	Unknown  	Withheld  	18k  	2  	completed at
Tue 07 Aug 2012 05:33:21 PM MST  	 
Brother-30  	Unknown  	Withheld  	57k  	1  	completed at
Tue 07 Aug 2012 05:31:58 PM MST  	 
Brother-29  	Unknown  	Withheld  	18k  	2  	completed at
Tue 07 Aug 2012 05:31:01 PM MST  	 
Brother-28  	Test Page  	anonymous  	1k  	1  	completed at
Tue 07 Aug 2012 05:29:52 PM MST 
"Unable to open print file: No such file or directory"

Job 28 printed, 29-31 did not print but did flash the busy light on the printer once.

Cups printer status from the admin web page:

Brother (Idle, Accepting Jobs, Not Shared, Server Default)
Description:	Brother HL-5250DN with driver Brother HL-5250DN BR-Script3
Location:	Computer Room
Driver:	Brother HL-5250DN BR-Script3 (grayscale, 2-sided printing)
Connection:	socket://192.168.2.253:9100
Defaults:	job-sheets=none, none media=na_letter_8.5x11in sides=one-sided

Tell me what you need to see and I'll post it tomorrow morning.
Comment 4 Stanley Miller 2012-08-08 04:27:18 UTC
Looking at comment #1 which I missed earlier.

t3400-1:~ # lpstat -v
device for Brother: socket://192.168.2.253:9100


t3400-1:~ # lpinfo -v
network beh
network socket
network ipp
network lpd
network https
network http
network smb
network ipps
direct parallel:/dev/lp0


t3400-1:~ # egrep 'NickName|cupsFilter' /etc/cups/ppd/Brother.ppd
*ShortNickName: "Brother HL-5250DN BR-Script3"
*NickName: "Brother HL-5250DN BR-Script3"


This worked:
t3400-1:~ # echo Hello | lp -d Brother
request id is Brother-40 (0 file(s))

This worked:
t3400-1:~ # echo Letter | a2ps -1 -M Letter -o- | lp -d Brother
[stdin (plain): 1 page on 1 sheet]
request id is Brother-41 (0 file(s))
[Total: 1 page on 1 sheet] sent to the standard output

This worked:
t3400-1:~ # echo -e 'One\fTwo' | lp -d Brother
request id is Brother-42 (0 file(s))

This worked:
t3400-1:~ # echo -e 'Letter-1\fLetter-2' | a2ps -1 -M Letter -o- | lp -d Brother
[stdin (plain): 2 pages on 2 sheets]
request id is Brother-43 (0 file(s))
[Total: 2 pages on 2 sheets] sent to the standard output

Retried all of the above as a normal user and they worked then too.

I'll reboot with the debug level set in the cups conf file and post that.
Comment 5 Stanley Miller 2012-08-08 04:42:00 UTC
Created attachment 501518 [details]
cups debug mode log file

I had to manually start cups after rebooting (rccups start) and a test page printed without problem. I then tried to print a short file from KWrite and the printer blinked but nothing printed.
Comment 6 Stanley Miller 2012-08-08 13:31:28 UTC
Forgot to remove the need info status
Comment 7 Johannes Meixner 2012-08-29 10:09:53 UTC
Regarding IPv6 disabled see
https://bugzilla.novell.com/show_bug.cgi?id=774522#c3


As far as I see - comment#4 and comment#5 mean that
basically it works but when printing e.g. from KWrite
on Brother HL-5250DN as BR-Script3 it does not work,
strictly speaking something is sent to the printer
(printer blinked) but the printer fails to print it.

In your attachment #501518 [details] there is:
----------------------------------------------------------------------------
D ... [Job 48] Request file type is application/pdf.
...
D ... [Job 48] envp[28]="FINAL_CONTENT_TYPE=application/vnd.cups-postscript"
...
I ... [Job 48] Started filter /usr/lib/cups/filter/pdftops (PID 3555)
I ... [Job 48] Started backend /usr/lib/cups/backend/socket (PID 3556)
...
D ... [Job 48] Started filter pdftops (PID 3557)
D ... [Job 48] Started filter pstops (PID 3558)
...
D ... [Job 48] %!PS-Adobe-3.0
D ... [Job 48] %Produced by poppler pdftops version: 0.20.0 ...
...
D ... [Job 48] PID 3557 (pdftops) exited with no errors.
...
D ... [Job 48] Wrote 2 pages...
D ... [Job 48] PID 3558 (pstops) exited with no errors.
D ... PID 3555 (/usr/lib/cups/filter/pdftops) exited with no errors.
...
D ... PID 3556 (/usr/lib/cups/backend/socket) exited with no errors.
...
I ... [Job 48] Job completed.
----------------------------------------------------------------------------
There are no errors from the printing system's point of view.

It is the printer's built-in PostScript interpreter that fails
to process the PostScript that is created in this case.
BR-Script3 is Brother's PostScript implementation, see
http://en.wikipedia.org/wiki/BR-Script

Now things become tricky because the root cause
could be a fault in Brother's PostScript implementation
or perhaps poppler pdftops version 0.20.0 that produced
this PostScript produced faulty PostScript or whatever else...

Unfortunately according to
http://welcome.solutions.brother.com/bsc/public_s/id/us/us/en/monolaserpri/hl5250dn_all/spec/index.html
---------------------------------------------------------------------
Printer Driver
...
For Linux 	GDI Printer Driver for Linux
                BR-Script3 (PPD file for Linux)
---------------------------------------------------------------------
and according to
http://www.openprinting.org/printer/Brother/Brother-HL-5250DN
---------------------------------------------------------------------
Do not use PCL-XL drivers ("pxlmono", "lj5gray").
---------------------------------------------------------------------
it seems the Brother HL-5250DN does not support another
standard printer language like PCL5e that could be used
at least as workaround, see the "PostScript Printers" section at
http://en.opensuse.org/SDB:Purchasing_a_Printer_and_Compatibility

Perhaps there is another workaround:

Set up a second print queue for this device using the PPD file
/usr/share/cups/model/Postscript-level2.ppd.gz
or even
/usr/share/cups/model/Postscript-level1.ppd.gz
which are listed in YaST with the driver description
"Generic PostScript level 2 Printer Foomatic/Postscript"
and
"Generic PostScript level 1 Printer Foomatic/Postscript"
respectively.
In YaST use [Search for] "generic postscript" to find them.

Please try out whether or not it works to print from KWrite
using a "generic postscript" driver.
Comment 8 Stanley Miller 2012-08-29 22:16:24 UTC
This is a new problem for 12.2 as I have been using this printer to print from Suse for many years and many past versions with no problems or glitches. I confirmed that Suse supported this printer before I bought it or bought Brother printers for my other users.


I have tried each of the recommended Brother 5250 drivers provided in 12.2 and none of them are working. I then tried the not-recommended ones anyway and the Foomatic/pxlmono one does work at least minimally.

Trying the generic drivers:

Generic Postscript Printer Foomatic/Postscript does not print.

Generic Postscript Level 2 Foomatic/Postscript does print.

Generic Postscript Level 1 Foomatic/Postscript does print.

Generic Postscript Level 1 Foomatic/Postscript1 does print.

The last three don't print very well, I was getting clipped text on my simple test printout, haven't tried anything fancy yet to see how that goes but I'll have to test a lot before deploying 12.2.

------------------

Poking around in the printer firmware I found an option to print the Postscript error message so I switched back to the Brother factory's 5250DN BR-Script3 driver and tried to print. I got this error message from the printer:

ERROR NAME;
    undefined
COMMAND;
    setoverprintmode
OPERAND STACK;
    --booleantype--

-------------------

Most frustrating, I may leave most of our users boxes on 12.1 rather than aggravate the users with printing glitches and me with unwanted messages about the glitches until I get some idea of the needed configuration tweaks to get decent looking printouts.
Comment 9 Johannes Meixner 2012-08-30 08:44:35 UTC
You did a very good analysis and your contribution
results that now the root cause is clear:

It is an already known and fixed issue in poppler
and therefore I re-assign it to our poppler maintainer.

The printer's PostScript error message "...setoverprintmode..." is key
and by this I found (via Google search for "setoverprintmode poppler")
the matching upstream bug report:

https://bugs.freedesktop.org/show_bug.cgi?id=50748
"The fix will be in poppler 0.20.1."

A bit later I even found our own duplicate bnc#774627 :-)


FYI:
Why it works with the "Postscript Level 1/2" drivers.

In this cases poppler's PostScript is converted
by Ghostscript into PostScript level 1 or level 2
and Ghostscript can process poppler's PostScript
and your printer can print Ghostscript's PostScript.


FYI:
My personal opinion regarding printer's PostScript
error messages disabled in the printer by defalut:

Usually in a PostScript printer you can switch on that it prints out
PostScript errors if it fails to process PostScript so that you get
a PostScript error printed in such cases so that you know that it
was your printer which failed.

Unfortunately those PostScript error printouts are usually disabled
so that the user is not informed what went wrong.

Of course it saves a lot of paper (and money) when the one sheet
with the PostScript error is not printed by default and apparently
it costs nothing when then users need a lot of time to find out why
a particular document does not print... :-(

I do not say that the typcial PostScript error printout text
is meaningful for normal users but at least they would know
their printer somehow does not like their particular document.

*** This bug has been marked as a duplicate of bug 774627 ***