Bug 23970 - kghostview totally confused without %%Page:
Summary: kghostview totally confused without %%Page:
Status: RESOLVED DUPLICATE of bug 229556
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR minor
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-04-10 17:33 UTC by Achim Bohnet
Modified: 2012-10-18 06:07 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Achim Bohnet 2001-04-10 17:30:15 UTC
(*** 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)
Comment 1 Luís Pedro Coelho 2003-04-04 01:18:57 UTC
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? 
Comment 2 Luís Pedro Coelho 2003-04-06 12:40:03 UTC
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 
Comment 3 Luís Pedro Coelho 2003-04-07 22:14:42 UTC
Ok, stupid solution/workaround: 
 
ps2pdf file_sansPage.ps file_sansPage.pdf 
 
work on file_sansPage.pdf. It works fine! 
Comment 4 Adriaan Moors 2003-11-19 13:35:50 UTC
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)
Comment 5 Achim Bohnet 2004-05-10 19:31:54 UTC
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
Comment 6 Tristan Miller 2004-10-27 20:19:39 UTC
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.
Comment 7 George Goldberg 2007-11-16 08:33:31 UTC
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.
Comment 8 George Goldberg 2008-01-31 02:29:50 UTC
In okular of KDE 4 trunk it only displays the last page of the document (whereas KGhostView only displays the first)
Comment 9 Tristan Miller 2010-03-05 15:40:08 UTC
I have opened a report for this bug in Okular as Bug 229556.
Comment 10 Adrián Chaves (Gallaecio) 2012-10-18 06:07:07 UTC
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 ***