printing of bitmap fonts is broken

Bug #119331 reported by zyzstar
4
Affects Status Importance Assigned to Milestone
kdepim (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: kmail

Every time I try to print within kmail (real printer of pdf) it starts to utilize a huge amount of memory and CPU resources and even locks the X Server. I tracked down it's gs utlity causing the problem:

jozefk@jozefk:~$ ps auxw | grep gs
 jozefk 13471 3.6 69.2 1070676 711044 ? D 16:13 0:03 gs -dSAFER -dCompatibilityLevel=1.4 -sPAPERSIZE=a4 -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=/home/jozefk/print.pdf -dSAFER -dCompatibilityLevel=1.4 -sPAPERSIZE=a4 -c .setpdfwrite -f /tmp/kde-jozefk/kdeprint_UuFdnJmU

I'm not aware of any special print configuration on my machine.

Revision history for this message
zyzstar (zyzstar) wrote :

My system info:
KMail 1.9.6 (Using KDE 3.5.6)
Kubuntu 7.04

Revision history for this message
Rich Johnson (nixternal) wrote :

I can print just fine from within kmail. I print from kmail daily using a HP PSC1610 multifunction printer without any issues. This printer is actually connected via Samba as well, but I can also print to a local HP LaserJet 4 as well.

This very well could be a printer issue maybe?

Changed in kdepim:
status: Unconfirmed → Needs Info
Revision history for this message
Rich Johnson (nixternal) wrote :

I just printed to PDF as well. Thanks, as I didn't even know that function existed :)

Anyways, I ran your command as well and noticed that gs is not running on my system. Could this be the issue?

Revision history for this message
zyzstar (zyzstar) wrote :

Strange. I thought that pdf-printer runs the same command on every machine. Are you sure gs command is not used when printhing into pdf?

Of course if you just typed 'ps aux | grep gs' after printing it's not there (but that also means there is no gs freezing on your machine).

What is you gs version? Mine is:

$gs --version
8.15.4

Revision history for this message
zyzstar (zyzstar) wrote :

This problem is easy to reproduce. The thing is that KMail sometimes produces PS file which gs has serious problems to convert to pdf.

Try to use "killgs" file from attachment (which is a PS file produced by KMail) and run the same command which the print subsystem uses for PS->PDF conversion:

gs -q -dSAFER -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=/tmp/your_output.pdf -sPAPERSIZE=a4 -c .setpdfwrite -f '/tmp/killgs'

(of course save the attachment as /tmp/killgs)

This problem is more serious as it looks. If you have such a PS file in your directory and you try to browse that directory with konqueror then the same thing happens (all CPU + memory occupied) because konqueror tries to make a thumbnail of that file using gs.

Revision history for this message
zyzstar (zyzstar) wrote :

It's a gs application problem. And it's definitely reproducible.

Revision history for this message
Pawel Kraszewski (root-kraszewscy) wrote :

Same happens to me.

1. The memory and CPU hog is GS
2. GS is gs-esp 8.15.4.dfsg.1-0ubuntu1
3. kmail is 3.5.6-0ubuntu6
4. Printer is LaserJet 1200
5. Cups driver is HP LaserJet 1200 Foomatic/pxlmono (recommended)

kmail is NOT the only program causing said trouble - KATE editor is also the subject, as is KDEVELOP. On the other hand, non-KDE programs behave correctly as some KDE do (eg. KPDF). My nose says, printout of core KDE rich-text-editor is broken.

Revision history for this message
Pawel Kraszewski (root-kraszewscy) wrote :

Ah, yes. I forgot - it is a 64 bit system

Revision history for this message
Pawel Kraszewski (root-kraszewscy) wrote :

Last thing, noticed today:
1. In KMAIL I use fixed font "Terminus" (which is bitmap rather than vector font)
2. After switching to vector font (either fixed or proportional) everything works OK.

So my observation is, that printing of bitmap fonts is broken on a low level in KDE.

Revision history for this message
zyzstar (zyzstar) wrote :

You might be right about fixed fonts. In the example above I used a fixed font "Console".

Revision history for this message
Pawel Kraszewski (root-kraszewscy) wrote : Re: [Bug 119331] Re: printing from kmail is broken

Dnia wtorek, 21 sierpnia 2007, zyzstar napisał:
> You might be right about fixed fonts. In the example above I used a
> fixed font "Console".

To be precise, not "fixed" but "bitmap".

"Courier new" is "fixed" but not "bitmap" - all letters have the same width,
but each letter itself is a set of lines and polygons (like SVG image)

"Terminus" is "fixed" AND "bitmap" - each letter is a small bitmap - looks
jaggy when sized up.

Windows' "sans" is "proportional" AND "bitmap" - letter "W" takes more space
than "i".

Nimbus is "proportional" but not "bitmap".

It is "bitmapness" that's causing trouble, not "fixedness".

--
 Pawel Kraszewski

Revision history for this message
zyzstar (zyzstar) wrote : Re: printing from kmail is broken

Yes, my mistake. I meant "bitmap" and not "fixed".
"Console" font is also bitmap.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for kdepim (Ubuntu) because there has been no activity for 60 days.]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.