(*** This bug was imported into bugs.kde.org ***) Package: kghostview Version: 0.11 (using KDE 2.1.9 >= 20010310) Severity: normal Installed from: debian-potato-i386 Compiler: gcc version 2.95.3 20010219 (prerelease) OS: Linux (i686) release 2.2.19pre17 OS/Compiler notes: Hi Wilco today is kghostview bug report time :) CVS buil do this morning (thanks again for the mimetype-error rewording!) A user got an ps file without ' %%Page[s:] pseudo comments. Result is: o only one page is listed on the left (gv shows nothing there) o next/prev does not work (okay in gv) o and worst print does not work at all: Printing failed because the list is pages to be printed is empty. In the new printing dialog I had 'all pages' selected (gv prints file) Looks like kghostview relies toooo much on %%Page stuff :( Bug can be is shown with ls -l /usr/bin | enscript -p ls.ps grep -v '^%%Page' ls.ps > ls-nopage.ps ls.ps works fine while ls-nopage.ps does not. Achim P.S. It's really asthonishing how much ps crap can be found in the web. (Submitted via bugs.kde.org) (Called from KBugReport dialog)
I can confirm this bug in HEAD and BRANCH. In HEAD (4-April-2003) it is even worse as not even the first page is shown. I don't know whether saying that Postscipt without %%Page comments is not support is such a good idea, so we should think of a solution to this. Is there something like ps2dsc readily available?
Further thoughts: 1. Start with a good file.ps 2. Remove %%Page (grep -v '^%%Page' file.ps > file_sansPage.ps) 3. Run "ps2ps file_sansPage.ps file_sansPageFixed.ps" Now file_sansPageFixed actually works, but the quality has been degraded, at least on my system (gs 7.05) with my test file. Still, a solution along these lines might be possible. luis pedro
Ok, stupid solution/workaround: ps2pdf file_sansPage.ps file_sansPage.pdf work on file_sansPage.pdf. It works fine!
related problem: if the ps file uses dos line-endings, the Page directives are not recognized. i recoded the file to use unix line endings and it worked... (using cvs snapshot from orth: 3.2.0-0+cvs20031104+orth)
Following 'Please review your...' If checked again with kghostview 0.20 of KDE 3.2.2 (btw. version 0.20 can't be selected in bugs.kde.org web form) With ls -l /usr/bin | enscript -p ls.ps # 35 pages of ps output grep -v '^%%Page' ls.ps > ls-nopage.ps kghostview ls-nopage.ps kghostview is at least usable with this sort of strange postscript file (nevertheless a bit strange;) o still: only one page show in the left page listing window (without %%Page I would expect no page in page listing window as gv does) o clicking 'next page' or selecting '1' in page listing window does nothing o 'last page' goes to page n+1 o 'first page' goes to page n+1 (yes +1 not -1) o after 'last page' click, prev page button is activated and clicking it goes also to n+1 so clicking 'last page' then 'first page' then 'last page' etc one can view page 1, 2, 3 etc, respectively. So now it's possible to see all pages, just the sequence of buttons to do it is a bit strange ;) I tried gv and there one can go through the file with clicking several times '>>' button. Going back to prev page is it in gv and kghostview not possible. Achim
If anyone wants a test file triggering the bug, check out the file guide.ps.gz in the tarball <http://www.netlib.org/svdpack/svdpackc.tgz>. (I am not attaching it here as I don't have permission to redistribute it.) Unzipping guide.ps.gz reveals that it contains no %%Page headers. KGhostview can display only the first page. However, once the file is converted via ps2ps or ps2pdf, KGhostview can display all of it.
I can confirm this bug is still present in KGhostView 0.20 (from KDE 3.5.7, Mandriva 2008.0 AMD64), based on the test case in comment #6.
In okular of KDE 4 trunk it only displays the last page of the document (whereas KGhostView only displays the first)
I have opened a report for this bug in Okular as Bug 229556.
Marking this report as a duplicate of the Okular bug, that has been resolved already. *** This bug has been marked as a duplicate of bug 229556 ***