Summary: | No print preview - error | ||
---|---|---|---|
Product: | [Unmaintained] kdeprint | Reporter: | info |
Component: | general | Assignee: | Michael Goffioul <kdeprint_bugs> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | davidpjames, jlayt, peter_77_schultz |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | RedHat Enterprise Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Print preview file
Result from gs command |
Description
info
2003-12-14 01:27:47 UTC
Hi again, it just occurred to me to try the gs command in the error message. (of course the filename is different now) [stephan@Godzilla-PC stephan]$ gs -q -dBATCH -dNOPAUSE -dSAFER -dNODISPLAY ps2ai.ps '/tmp/kde-stephan/kdeprint_ASC0DGiz' | sed -e "s/%%BoundingBox: 0 0 612 792/%%BoundingBox: 0 0 595 842/g" > '/tmp/kde-stephan/konquerorV6jVwa.tmp' [stephan@Godzilla-PC stephan]$ ls -l /tmp/kde-stephan/konquerorV6jVwa.tmp -rw-rw-r-- 1 stephan stephan 43424 14. Dez 00:35 /tmp/kde-stephan/konquerorV6jVwa.tmp [stephan@Godzilla-PC stephan]$ So, no gs error. But the preview didn't work this time either. But, trying to look at the resulting .tmp file: [stephan@Godzilla-PC stephan]$ kghostview /tmp/kde-stephan/konquerorV6jVwa.tmp ASSERT: "m" in kgvdocument.cpp (465) [stephan@Godzilla-PC stephan]$ and kghostview crashes (and the KDE crashmanager comes up). Hope this helps! Cheers Stephan Could you check if you have some filter attached to the printer? (in the printer properties dialog -> "Filters" tab). If yes remove. From the debug output you reported, it looks like something is executed before the preview is started. Michael. Thanks for your help! I removed all filters now from the printers dialogue, and it's still the same. Also I made sure that the printer driver uses default values for margins and other settings in the dialogue. I see your point from the output, but I can't figure out where and why this filter is called. The output shows that ps2ai.ps is called. This is in /usr/share/ghostscript/7.07/lib/ps2ai.ps and says: ps2ai.ps - a postscript to editable adobe illustrator file filter I don't know what it is for. Why is this filter only called for preview, not for printing? Printing is fine. I have two different printer drivers, using CUPS General Postscript, Foomatic + Postscript (recommended) Lexmark 3200, Foomatic + lm3200 (recommended) Stephan Subject: RE: No print preview - error > I removed all filters now from the printers dialogue, and > it's still the same. Also I made sure that the printer driver > uses default values for margins and other settings in the dialogue. Does this mean that the filter output (looks like enscript output to me) is still present? Even when simply printing, no preview? > > I see your point from the output, but I can't figure out > where and why this filter is called. > > The output shows that ps2ai.ps is called. This is in > /usr/share/ghostscript/7.07/lib/ps2ai.ps and says: > ps2ai.ps - a postscript to editable adobe illustrator file filter > > I don't know what it is for. Me neither. KDEPrint uses the kghostview part to view the print file generated by the application. The rest is kghostview (Luis, as kghostview bug responsible, could you have a look?). > Why is this filter only called for preview, not for printing? > Printing is fine. Looking at your initial bug report, the "weird" output is also there when you simply print with no preview. I don't know where it comes from, however. Michael. Hi Michael,
thanks for your help. I'm not sure I understand your questions exactly. Sorry if I repeat what you already know...
> Looking at your initial bug report, the "weird" output is also
> there when you simply print with no preview.
I don't think so. The first line in the output (the ypcat thing) came from something different (some wrong setting in the DNS system?), that doesn't come up any more. Without preview I do not get any error or weird output, only with preview.
Here is the situation now: I just tried again, same procedure in the initial report. I started konqueror from command line, called www.google.com and tried to print, making sure that no filters are set in the print dialogue
Situation 1.: Direct printing, no preview: Page comes out of the printer perfectly fine, no error message at all on the command line (even the "Wrote 1 page" is not there - that might have been some filter).
Situation 2: with preview, all other settings as in situation 1. Again the error box with
Öffnen nicht möglich (= cannot open)
/tmp/kde-stephan/kdeprint_XigKGTQM
then the empty preview window, and on the command line the following output:
[stephan@Godzilla-PC stephan]$ konqueror
parsing started
size is 4
parsing finished
command to execute is (gs -q -dBATCH -dNOPAUSE -dSAFER -dNODISPLAY ps2ai.ps '/tmp/kde-stephan/kdeprint_XigKGTQM' | sed -e "s/%%BoundingBox: 0 0 612 792/%%BoundingBox: 0 0 595 842/g" > '/tmp/kde-stephan/konquerorsxjqVb.tmp')
unknown operator: Adobe_packedarray
pushing Adobe_packedarray to stack
etc. etc.
---
So, this program is only called for preview, and fails. The file /tmp/kde-stephan/kdeprint_XigKGTQM exists and I can open it with Kghostview, but
/tmp/kde-stephan/konquerorsxjqVb.tmp (the output from the gs command) does not exist. But I can produce the .tmp file by copying the gs command to the command line. But the resulting file crashes kghostview (see previous report).
I see two points here:
1. For the preview kghostview tries to call ghostscript, and this fails, although the command works from the command line.
2. When executing the gs command from the command line, the result is not readable.
So perhaps it is a problem with my ghostscript? But I'm using the standard Fedora ghostscript:
[stephan@Godzilla-PC stephan]$ rpm -qa | grep ghostscript
ghostscript-7.07-11
ghostscript-fonts-5.50-9
Perhaps you can try the following:
I attach the files kdeprint_ZT9iPZLW and konquerorX2jmkc.tmp
I produced the second one by calling
gs -q -dBATCH -dNOPAUSE -dSAFER -dNODISPLAY ps2ai.ps 'kdeprint_ZT9iPZLW' | sed -e "s/%%BoundingBox: 0 0 612 792/%%BoundingBox: 0 0 595 842/g" > 'konquerorX2jmkc.tmp'
This file is not readable (kghostview crashes)
Perhaps you can try the same and see if you get something reasonable. If it works for you, then the problem might be my ghostscript.
Just to make sure that it is not a konqueror thing: I just tried with kedit. the command line output is:
[stephan@Godzilla-PC stephan]$ kedit test
parsing started
size is 4
parsing finished
command to execute is (gs -q -dBATCH -dNOPAUSE -dSAFER -dNODISPLAY ps2ai.ps '/tm
p/kde-stephan/kdeprint_kKG8tfCu' | sed -e "s/%%BoundingBox: 0 0 612 792/%%Boundi
ngBox: 0 0 595 841/g" > '/tmp/kde-stephan/kedit8JycFb.tmp')
unknown operator: Adobe_packedarray
pushing Adobe_packedarray to stack
...
unknown operator: TO
pushing TO to stack
before save document
after save document
QObject::connect: Cannot connect KStatusBarLabel::itemPressed(int) to (null)::pr essed(int)
QObject::connect: Cannot connect KStatusBarLabel::itemReleased(int) to (null)::r eleased(int)
ASSERT: "sb" in koView.cc (420)
QObject::connect: Cannot connect KStatusBarLabel::itemPressed(int) to (null)::pr essed(int)
QObject::connect: Cannot connect KStatusBarLabel::itemReleased(int) to (null)::r eleased(int)
ASSERT: "sb" in koView.cc (420)
[stephan@Godzilla-PC stephan]$
And kedit crashes, with the KDE crashmanager coming up (no preview window at all, not even an empty one).
Cheers
Stephan
Created attachment 3995 [details]
Print preview file
This is an example for a file that the previews tries to process through the gs
command:
gs -q -dBATCH -dNOPAUSE -dSAFER -dNODISPLAY ps2ai.ps 'kdeprint_ZT9iPZLW' | sed
-e "s/%%BoundingBox: 0 0 612 792/%%BoundingBox: 0 0 595 842/g" >
'konquerorX2jmkc.tmp'
Created attachment 3996 [details]
Result from gs command
The resulting file from the gs command, when gs is called from command line.
Hi, The problem seems to be the gs command. I just tried it on a Sun Solaris System and it produces again unreadable output. Either there is a bug in gs or ps2ai or kde doesn't pass the correct arguments. I still don't know WHY the gs command is called at all (I have no filters defined). It's only called for the preview. Perhaps we can get to the bottom of this if we can find out whether it should be called at all and what it is supposed to do. Sorry that I can't be of more help. Cheers Stephan I too can confirm what the reporter is seeing (3.1.95 - waiting for the 3.2 debs to make their way into Sid). However, I noticed something odd; I recently created a new user account for my girlfriend and there the print preview works just fine, yet on my user account it does not. Since her .kde dir is new and mine is not it might be an issue with older kde profiles. Hi again, Yes, could be related to upgrade to 3.2. I never had the problem before upgrading to 3.2. I found a similar report on the German SuSE list from somebody who experienced it after upgrading to KDE 3.2 (he didn't find a solution) http://lists.suse.com/archive/suse-laptop/2003-Nov/0104.html http://lists.suse.com/archive/suse-laptop/2003-Nov/0135.html http://lists.suse.com/archive/suse-laptop/2003-Nov/0159.html I don't want to delete all my .kde settings. But I tried to experiment woth ressource files that seem to have to do with printing. So I deleted: .kde/share/config/kdeprintrc .kde/share/config/kprinterrc .kde/share/config/kghostviewrc But it did not solve the problem. Which other files could be relevant? Cheers Stephan *** Bug 75253 has been marked as a duplicate of this bug. *** KDEPrint does not call "gs" directly: it loads the kghostview part and load the generated PS file (coming from the application) into that part. So in the end, "gs" is called by kghostview. What you can try is to print to a PS file, then view this file with kghostview. I have the impression that either the generated PS file is faulty and kghostview is not able to open it correctly, or kghostview is wrong when opening a valid (but maybe special) PS file. In both cases, this is out of control of KDEPrint. Jippieh! SOLVED! Hi Michael, thanks for your comment, which helped me to find the problem. The problem was that the default embedded viewer for Postscript files was set to Karbon14 rather than Kghostview. And Karbon14 can't open it. Possibly this is a wrong default setting in some packages? I'm quite sure that I never changed that setting deliberately, and it started when I updated to KDE 3.2. So for anybody who has the same problem: Go to "file associations" in the konqueror configure dialoge Find application/postscript Make sure that the embedded viewer is Kghostview, not Karbon14. Thanks a lot for your help! Stephan Let's close it then. Closing old Resolved status bug. |