Bug 80148 - CUPS error when printing from KDE apps
Summary: CUPS error when printing from KDE apps
Status: CLOSED NOT A BUG
Alias: None
Product: kdeprint
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-22 19:30 UTC by Gustavo Michels
Modified: 2008-12-31 17:03 UTC (History)
1 user (show)

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


Attachments
cups log (32.54 KB, text/plain)
2004-06-26 17:01 UTC, mail
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Michels 2004-04-22 19:30:32 UTC
Version:            (using KDE KDE 3.2.1)
Installed from:    Gentoo Packages
Compiler:          gcc version 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7) 
OS:          Linux

When printing from KDE apps, sometimes I get the client-error-bad-request cups error. This doesn't happen all the time, and it even happens with differente pages in the same document. For example, I was able to print pages 1 and 3 from a Kivio document I was creating, but page 2 would always spit out the cups error.

While searching the net, I found this post [1] in a mailing list describing a problem which is pretty much equal to mine. In fact, the resolution the poster proposed indeed solved my problem.

Here's the command I used which printed the page without a glitch:

gmichels@gustavo kde-gmichels $ cupsdoprint -P 'BJC-250' -J '' -H 'localhost:631' -U 'gmichels' '/tmp/kde-gmichels/kdeprint_av0TfuOc'

I am using cups version 1.1.20, compiled from sources (gentoo ebuilds).

Regards
Gustavo

[1] https://mail.fukt.bth.se/pipermail/crux/2004-April/002370.html
Comment 1 Michael Goffioul 2004-04-23 08:45:40 UTC
Looking at the reference you mention, the given option values are plain wrong, it looks like they contain garbage characters. It should be:

-o ' copies=3 orientation-requested=3'

Do you also have those garbage characters? Which Qt version are you using?
Comment 2 Gustavo Michels 2004-04-23 14:34:00 UTC
Well actually I don't know how to look at the command kdeprint is sending to cups, as the guy in the reference did.

All I did was issue the command without the -o stuff and it printed. If you tell me how do I look at the command kdeprint is sending to cups, I guess I can be more useful.

I am using qt 3.3.0.
Comment 3 Michael Goffioul 2004-04-23 15:17:51 UTC
To see the command send by kdeprint (if debug hasn't been disabled in your KDE packages), just start the KDE app in a terminal and look for debug output in that terminal when printing. Otherwise, you should see the command used when you get the error dialog: it is contained in the error message.
Comment 4 Gustavo Michels 2004-04-23 15:30:16 UTC
Unfortunately debug has been disabled.

Well I don't get any errors. After clicking "print", KJobViewer appears in the system tray, the job reads "processing" for a while then changes itself to "queued". No error messages or whatever. I can only see the error in cups page (http://localhost:631).

Is there any other way to check? Otherwise I will recompile koffice with debug enabled.
Comment 5 Michael Goffioul 2004-04-23 16:21:14 UTC
In your original report, you mention that you get sometimes "client-error-bad-request"; in this case you should be able to see the print command used in the error dialog.
When you don't get any error and the job changes from "Processing" to "Queued", this probably means that the print queue has been stopped by CUPS for any reason. Check the printer status reason, either using web interface http://localhost:631, or using the "IPP Report" item in the menu when right-clicking on a printer in the KDE print manager.
Finally, you may also edit /etc/cups/cupsd.conf and set "LogLevel" to "debug2" (wihtout the quotes), then restart the CUPS server and try to print again. While trying to print, monitor the CUPS log file using "tail -f /var/log/cups/error_log" command. You might see some meaningful messages.
Comment 6 Gustavo Michels 2004-04-23 16:43:56 UTC
Here's some output from cups log at debug2 level:

First this:
D [23/Apr/2004:11:34:40 -0300] StartJob: argv = "BJC-250","91","gmichels","Fluxograma P1","1","PageSize=A4 media=A4 multiple-document-handling=separate-documents-collated-copies orientation-requested=3 page-ranges=2","/var/spool/cups/d00091-001"

then this

D [23/Apr/2004:11:34:42 -0300] [Job 91] Parameter Summary
D [23/Apr/2004:11:34:42 -0300] [Job 91] -----------------
D [23/Apr/2004:11:34:42 -0300] [Job 91]
D [23/Apr/2004:11:34:42 -0300] [Job 91] Spooler: cups
D [23/Apr/2004:11:34:42 -0300] [Job 91] Printer: BJC-250
D [23/Apr/2004:11:34:42 -0300] [Job 91] PPD file: /etc/cups/ppd/BJC-250.ppd
D [23/Apr/2004:11:34:42 -0300] [Job 91] Printer model: Canon BJC-250 Foomatic/bjc600
D [23/Apr/2004:11:34:42 -0300] [Job 91] Job title: Fluxograma P1
D [23/Apr/2004:11:34:42 -0300] [Job 91] File(s) to be printed:
D [23/Apr/2004:11:34:42 -0300] [Job 91] <STDIN>
D [23/Apr/2004:11:34:42 -0300] [Job 91]
D [23/Apr/2004:11:34:42 -0300] [Job 91] Pondering option 'PageSize=A4'
D [23/Apr/2004:11:34:42 -0300] [Job 91] Pondering option 'media=A4'
D [23/Apr/2004:11:34:42 -0300] [Job 91] Pondering option 'multiple-document-handling=separate-documents-collated-copies'
D [23/Apr/2004:11:34:42 -0300] [Job 91] Unknown option multiple-document-handling=separate-documents-collated-copies.
D [23/Apr/2004:11:34:42 -0300] [Job 91] Pondering option 'orientation-requested=3'
D [23/Apr/2004:11:34:42 -0300] [Job 91] Unknown option orientation-requested=3.
D [23/Apr/2004:11:34:42 -0300] [Job 91] Pondering option 'page-ranges=2'
D [23/Apr/2004:11:34:42 -0300] [Job 91] Unknown option page-ranges=2.
D [23/Apr/2004:11:34:42 -0300] [Job 91]
D [23/Apr/2004:11:34:42 -0300] [Job 91] ================================================
D [23/Apr/2004:11:34:42 -0300] [Job 91]
D [23/Apr/2004:11:34:42 -0300] [Job 91] File: <STDIN>
D [23/Apr/2004:11:34:42 -0300] [Job 91]
D [23/Apr/2004:11:34:42 -0300] [Job 91] ================================================


I'd like to add I am trying to print that kivio document which has 3 pages. I am trying to print page 2 only, using the option range=2-2 in the print options dialog.
Comment 7 Sean E. Russell 2004-05-18 13:55:54 UTC
I see the same behavior, so I can confirm it.

My case is a bit more complicated; I'm printing from one KDE desktop to another Linux box running Cups.  

As with the original poster, if I print using cupsdoprint from the remote client without the "-o" options, it prints fine.  If I print directly from, say, kpdf and try to print exactly one page, it fails.  On the server side, the Cups error message is:

	E [18/May/2004:07:36:48 -0400] print_job: No file!?!

On the client side, the Cups error message is:

	E [17/May/2004:21:39:56 -0400] [Job 213] Print file was not accepted (client-error-bad-request)!
	E [17/May/2004:21:39:56 -0400] PID 20820 stopped with status 1!

I can give you more debugging information, but I'm pretty sure that the problem is that kprint is sending bad options to Cups.
Comment 8 mail 2004-06-26 17:01:46 UTC
Created attachment 6481 [details]
cups log

I also have big problems with kdeprint. Printing from Staroffice directly to
the printers works fine (I use turboprint with cups 1.1.20 if that matters).
But printing via kdeprint gives strange errors. With one printer I only get two
errors (translated from german): "Error printing the files" and "Error with
printing. System says: <nothing> Error reading filter description for true.
Received command line was empty." error_log attached.
With another printer the first page is never printed.
Comment 9 Michael Goffioul 2004-06-27 20:03:26 UTC
At leqst, to solve the problem with the first printer ("Error reading filter description" and so on), you can try to remove the file ~/.lpoptions.

Michael.
Comment 10 mail 2004-09-24 19:11:17 UTC
My problems have been solved in 3.3.0. But removing .lpoptions was a bad idea. Luckily I had a backup of this file, because without I got an error again, but cannot really remember which one.

Gustavo, do you still have the problem in 3.3.0?

Comment 11 Gustavo Michels 2004-09-24 20:34:45 UTC
Well, I didn't have koffice anymore, so I just compiled the latest one (1.3.2) to try that very kivio document. And, it didn't print :-)

I switched to openoffice months ago and never had a print problem ever since. Printing from other kde apps (kmail, konqueror) also looks normal, so I thought maybe the problem is this particular file. Anyway, I don't print that much (not even every day), so maybe there is a problem anyway.

I am using kde 3.3.0, qt 3.3.3, gcc 3.3.4, glibc 2.3.3, cups 1.1.20.
Comment 12 Kurt Pfeifle 2007-01-13 02:27:00 UTC
Now, more than 2 years later, this thread has timed out.... Also, we have KDE 3.5.5 now.

Gustavo,

feel free to re-open this bug if it is still a problem for you.
Comment 13 John Layt 2008-12-31 17:03:35 UTC
Closing old Resolved status bug.