Red Hat Bugzilla – Bug 31371
can't print from kmail
Last modified: 2007-04-18 12:32:06 EDT
I have kmail installed but I cannot print. The dialogs come up but nothing
happens. Other application such as mozilla can print. I suspect that it
is the generates postscript that is wrong. If I "print" to a file and then
use lpr to print still nothing.
The printer is a HP4000 using the jetdirect interface.
Works perfectly here, both printing directly to a Lexmark Color JetPrinter
3000 and printing to a file and displaying it in kghostview.
This must be a bug in the postscript parser in your printer.
(kmail generates valid postscript, but the printer doesn't undestand it).
OK, I believe I have a better idea what the bug is.
This is on qa0328. The hardware is Beta Hardware system #33. The printer is an
HP Laserjet 4000 which is connected via an HP JetDirect Ex Plus box.
I defined two print queues (both to the same IP address). One is a jetdirect
interface (port 9100) and the other is a "Unix LPD" for queue "ram" on the ip
kmail prints correctly if I use the "unix LPD" queue. It does NOT work if I use
the jetdirect queue.
The kmail print "panel" shows the Unix LPD OK properly but not the JEtDirect
queue. It appears that kmail (or something in qt) is interpreting things
On the kmail print panel for the JetDirect queue (lp),
lp: :sh: :ml=0: :mx=0: :sd=/var/spool/lpd/lp: :lp=
locally connected [!!]
Aliases and a whole bunch of stuff.
Created attachment 14383 [details]
My /etc/printcap file created by printtool
Still present in qa0401
I ran another test (on qa0401) and kwite works fine -- it is only kmail that
screws up with a jetdirect (port 9100) interface.
that's really weird, seeing as they both use the same printing interface...
They (kmail and kwrite) don't "look" like they use the same interface. The
print-panel popup that comes up looks completely different.
*** This bug has been marked as a duplicate of 35193 ***
Oops. It appears that the "bug" reported as 35193 is NOT the same problem.
Even with that problem resolved, kmail will still not print to a JetDirect queue
and the print panel as a wierd entry for the JetDirect queue although a Unix
Printer queue "looks" proper and prints OK.
I believe I see what kmail is getting confused about.
The new printconf package creates an /etc/printcap file for the JetDirect
interface with an entry:
in the definition for "lp". For some reason, it is using the text after lp=
rather than just lp as the "name" of this print queue.
This is definitely a kmail problem.
I have looked at the source code and this is NOT a kmail bug. Kmail appears to
be one of the few (only?) application which uses qt's QPrint function. The
problem is in the parsePrintcap function located in qprintdialog.cpp. Their
"simplistic" parsing of /etc/printcap treats the qhole string of characters
(minus whitespace) between the beginning of a definition and the first '|'
character to be the "name" of the print queue.
Circumvention: assign an alias to the print queue.
*** This bug has been marked as a duplicate of 35937 ***