Bug 99406 - Printing from Konqueror produces unreadable pdf
Summary: Printing from Konqueror produces unreadable pdf
Status: CLOSED FIXED
Alias: None
Product: kdeprint
Classification: Unmaintained
Component: general (show other bugs)
Version: 3.3.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KDEPrint Devel Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-14 23:20 UTC by Nicolas Girard
Modified: 2008-12-31 18:00 UTC (History)
1 user (show)

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


Attachments
Produced pdf file (60.62 KB, application/pdf)
2005-02-14 23:21 UTC, Nicolas Girard
Details
Second pdf file (63.16 KB, application/pdf)
2005-02-16 10:17 UTC, Nicolas Girard
Details
PS Printed from konqueror (51.83 KB, application/postscript)
2005-05-23 12:34 UTC, Gerald Weber
Details
PDF printed from konqueror (117.51 KB, application/pdf)
2005-05-23 12:36 UTC, Gerald Weber
Details
PDF converted from PS with ps2pdf (16.33 KB, application/pdf)
2005-05-23 12:38 UTC, Gerald Weber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Girard 2005-02-14 23:20:16 UTC
Version:           3.3.2 (using KDE 3.3.2, Mandrake Linux Cooker i586 - Cooker)
Compiler:          gcc version 3.4.3 (Mandrakelinux 10.2 3.4.3-3mdk)
OS:                Linux (i686) release 2.6.10-1mdk-i686-up-64GB

Steps to reproduce the bug:
- start konqueror
- browse http://particuliers.creditlyonnais.fr/article.aspx?idarticle=1721&iduniversproduit=189
- choose Document->Print->Print into a file (PDF)

Observed behaviour:
- The pdf file produced can be read using a recent version of Kpdf, though characters are badly displayed.
- The pdf file produced can't be read using Adobe Acrobat reader 5.0.5 ; the associated error message is: "There was an error processing a page. There was a problem reading this document (130)."

I'm about to attach the abovementioned pdf file I've created on my box.
Comment 1 Nicolas Girard 2005-02-14 23:21:12 UTC
Created attachment 9637 [details]
Produced pdf file
Comment 2 Michael Goffioul 2005-02-16 10:12:26 UTC
Can you try to print the web page to a PS file, then convert the resulting file to PDF using "ps2pdf"? Does the PDF generated have the same problem?

Michael.
Comment 3 Nicolas Girard 2005-02-16 10:16:29 UTC
Sure, here you are... indeed this second pdf file has the same prob.
Comment 4 Nicolas Girard 2005-02-16 10:17:41 UTC
Created attachment 9663 [details]
Second pdf file

Generated using:

- Document -> print -> print in a postscript file
- ps2pdf14 print.ps
Comment 5 Nicolas Girard 2005-02-16 11:59:06 UTC
The recipient of the mail I attached the first pdf file to also confirms she couldn't open it using Adobe Acrobat Reader 6.0 on Windows
Comment 6 Nicolas Girard 2005-02-16 12:06:46 UTC
Hey, I think I got something...

The machine on which I performed these tests first has:
$ rpm -qv  kdebase-progs ghostscript
kdebase-progs-3.3.2-56mdk
ghostscript-8.15-4mdk

But strangely enough, I just tried on a laptop, and *did* succeed in reading the pdf file ! On this laptop I have:
$ rpm -qv  kdebase-progs ghostscript
kdebase-progs-3.3.1-24mdk
ghostscript-7.07-25mdk

Seems to be related to Ghostscript 8... what do you think ?

As a further test, which package should I upgrade first on the laptop before retrying, ghostscript or kdebase-progs ?
Comment 7 Michael Goffioul 2005-02-16 16:02:09 UTC
This is also what I guessed: the problem is related to ghostscript. Indeed, KDEPrint uses gs to convert from the PS (generated by the application) to PDF. This is why you also get the problem when you convert the file manually. You can try to upgrade KDE on your laptop, but I'm almost sure the problem will not pop up. However, when upgrading ghostscript, you may see the problem appear again. Please close the bug if this reveasle true, because this is not related to kdeprint.

Michael.
Comment 8 Gerald Weber 2005-05-23 12:25:42 UTC
I'm having similar problems when printing form konqueror or from kmail
(SuSE 9.2, kdebase3-3.3.0-29.3, kdenetwork3-3.3.0-35).
When I print a PS, it looks fine, If I convert it to ps (using ps2pdf) it also looks OK. However if I print directly to pdf it looks all mixed up even though the preview (which I know is PS) looks correct.
Comment 9 Gerald Weber 2005-05-23 12:34:07 UTC
Created attachment 11160 [details]
PS Printed from konqueror 

Web page (this bug report) printed with konqueror as PS file.
Comment 10 Gerald Weber 2005-05-23 12:36:02 UTC
Created attachment 11161 [details]
PDF printed from konqueror

web page printed from konqueror as PDF file. Note that fonts are all displaced
making the file look very ugly.
Comment 11 Gerald Weber 2005-05-23 12:38:50 UTC
Created attachment 11162 [details]
PDF converted from PS with ps2pdf

PS file (id=11160) converted to PDF using ps2pdf. It looks they way it should.
Comment 12 Cristian Tibirna 2005-08-22 20:52:15 UTC
UNCONFIRMED (batch reassigning messed this)
Comment 13 Cristian Tibirna 2005-09-20 05:41:52 UTC
Gerald Weber: please confirm that:
a) you do the ps2pdf (manual) conversion on the same machine on which you print with kprinter
b) if a), then confirm that you don't have two ghostscripts installed. It might be that kprinter pics from its $PATH one version while your ps2pdf on the command line pics the other (found in the $PATH of your console)

Thanks
Comment 14 Michael Goffioul 2005-09-20 09:10:42 UTC
As a side note, the ps2pdf filter embedded in kdeprint is *not* using ps2pdf executable (due to problems with filenames containing spaces), but uses plain "gs" with similar options to produce PDF. However, it's possible to tune a lot more options in the "Driver Settings" tab of the printer properties dialog. Maybe some default values are not well chosen, so you might try to play with these options a little bit (especially those related to fonts).

Michael.
Comment 15 Gerald Weber 2005-09-20 10:09:10 UTC
Answer to comment #13: 
a) Yes, I've used ps2pdf on the same machine 
b) No, I don't have two ghostscripts installed, as far as I'm aware, I had a standard SuSE 9.2 installation.

Answer to comment #14:
I suspected that it might be something along the lines of a gs setting. However, I could not find where this is defined and try to play with these settings.

Final comment:
I have now upgraded to SuSE 9.3 and the problem has gone away. However, it
would be nice to know what caused it because it is a long standing problem, at
least for me.
I was having this problem for as long as I can remember (SuSE 8.2 to 9.2, Conectiva at least since version 8, proably earlier).

I think it would be useful for this bug report to register where the settings 
for the kdeprint pdf generation is kept, e.g., if this is a setting defined
at compile time, system wide setting in /etc or personal settings.

Many thanks, 
Gerald
Comment 16 Michael Goffioul 2005-09-20 10:44:48 UTC
These settings are part of the internal filtering mechanism of kdeprint, stored in XML files. Those are located in $KDEDIR/share/apps/kdeprint/filters/.

Michael.
Comment 17 Kurt Pfeifle 2007-01-09 03:02:00 UTC
Bug is fixed according to comment 15 ...
Comment 18 Kurt Pfeifle 2007-01-09 03:05:41 UTC
Ooops, just saw that comment 15 was not from the original reporter.

So, Nicolas,

if this problem still prevails for you when using KDE 3.5.5, please reopen this report. (Make sure to run "qtconfig" and have "embed fonts in postscript jobs" enabled, and run "kaddprinterwizard --kde-config" and also have "Fonts"+"embed" enabled.)

Cheers, Kurt
Comment 19 John Layt 2008-12-31 18:00:51 UTC
Closing old Resolved status bug.