Bug 254672 - kde printer configurator corrupts JobSheets option in cups printer.conf configuration file.
Summary: kde printer configurator corrupts JobSheets option in cups printer.conf confi...
Status: RESOLVED FIXED
Alias: None
Product: system-config-printer-kde
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Jonathan Riddell
URL:
Keywords:
: 257178 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-10-19 19:44 UTC by p92
Modified: 2011-02-14 16:52 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
orientation option in kde printing configurator (105.45 KB, image/png)
2010-10-19 19:45 UTC, p92
Details
okular default options for cover pages (60.10 KB, image/png)
2010-10-19 19:48 UTC, p92
Details

Note You need to log in before you can comment on or make changes to this bug.
Description p92 2010-10-19 19:44:49 UTC
Version:           0.11.2 (using KDE 4.5.2) 
OS:                Linux

It seems that cups refuses print jobs from okular when the page orientation option in kde printer configuration dialog (printer task option) is changed from the default "portrait no rotation" to another not null orientation (90/180/270).

The error line in the cups erro log is :
Print-Job client-error-bad-request: Bad job-sheets value ""!

In this case it will be possible to get the print job accepted only in changing the cover page options in the okular print dialog to anything other than none.

In fact, when no cover pages are requested, okular should send the string "," instead of "" , as cups job-sheets option (the "," separator is mandatory for cups).

Gwenview does this correctly.
Firefox has the same problem as okular.
Strangely this problem does not show up when page orientation is 0°.

Reproducible: Always

Steps to Reproduce:
1. set up a page orientation of 90/270/180° in the job tasks options of kde printer configurator
2. use no cover pages while printing


Actual Results:  
The print job is rejected silently
Cups error log in debug mode shows :
Print-Job client-error-bad-request: Bad job-sheets value ""!

Expected Results:  
Print job accepted and processed.

OS: Linux (x86_64) release 2.6.35-22-generic
Compiler: cc
Comment 1 p92 2010-10-19 19:45:58 UTC
Created attachment 52684 [details]
orientation option in kde printing configurator
Comment 2 p92 2010-10-19 19:48:02 UTC
Created attachment 52685 [details]
okular default options for cover pages
Comment 3 p92 2010-10-19 19:52:33 UTC
Okular command line when printing.

okular(31823)/okular (app) Okular::FilePrinter::doPrintFiles: Executing "lpr" with arguments ("-P", "DESKJET_970C", "-#1", "-J", "toto.pdf", "-o", "media=A4", "-o", "portrait", "-o", "sides=one-sided", "-o", "outputorder=normal", "-o", "Collate=False", "-r", "/tmp/kde-pascal/okularG31823.ps")
lpr: Bad job-sheets value ""!
Comment 4 p92 2010-10-19 20:19:42 UTC
Well ok I found the real culprit, it is the kde printer configuration panel which does not correctly copy the JobSheets options back to cups printers.conf configuration file.


pascal@minipc:/etc/cups$ sudo diff -u ~/tmp/printers.conf.before ~/tmp/printers.conf.after
--- /home/pascal/tmp/printers.conf.before       2010-10-19 20:14:44.190758002 +0200
+++ /home/pascal/tmp/printers.conf.after        2010-10-19 20:12:58.530757999 +0200
@@ -7,16 +7,17 @@
 MakeModel HP Deskjet 970c, hpcups 3.10.6
 DeviceURI dnssd://usbprinter._printer._tcp.local/
 State Idle
-StateTime 1287512031
+StateTime 1287509009
 Type 36876
 Filter application/vnd.cups-raw 0 -
 Filter application/vnd.cups-raster 0 hpcups
 Accepting Yes
 Shared Yes
-JobSheets none none
+JobSheets  
 QuotaPeriod 0
 PageLimit 0
 KLimit 0
 OpPolicy default
 ErrorPolicy retry-job
+Option orientation-requested 3
 </Printer>
pascal@minipc:/etc/cups$

------------------------------------------------------------------------
Is is possible to reassign this bug to the correct product ?

And change the title to :
"kde printer configurator corrupts JobSheets option in cups printer.conf configuration file."
Comment 5 p92 2010-10-19 20:24:07 UTC
the product could be   system-config-printer-kde
Comment 6 Thomas Courbon 2010-11-17 19:49:52 UTC
*** Bug 257178 has been marked as a duplicate of this bug. ***
Comment 7 Thomas Courbon 2010-11-17 19:52:22 UTC
The bug 257178 is a duplicate of this one and I can confirm the issue, not only with okular but also with Firefox (whereas Krita and Kwrite work for example).

I fail to understand why some applications work. Appending none to the JobSheets configuration file's line doesn't break the working applications.
Comment 8 Dominic Lyons 2011-01-17 01:53:34 UTC
The bug is also mentioned on https://bugs.launchpad.net/kdeadmin/+bug/403169
Comment 9 p92 2011-01-17 04:05:41 UTC
Still onfirmed with kde 4.5.5
Comment 10 Jonathan Riddell 2011-02-14 16:51:16 UTC
SVN commit 1220673 by jriddell:

Don't mark as changed when adding new job options, causes UI not to be filled
(will be marked as changed when editing the options instead)
BUG:254672


 M  +1 -1      system-config-printer-kde.py  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1220673
Comment 11 Jonathan Riddell 2011-02-14 16:52:44 UTC
SVN commit 1220674 by jriddell:

Backport revision 1220673
Don't mark as changed when adding new job options, causes UI not to be filled
(will be marked as changed when editing the options instead)
BUG:254672



 M  +1 -1      system-config-printer-kde.py  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1220674