Bug 748257 - evince, okular, xpdf (libpoppler) Shows Wrong Page Order
evince, okular, xpdf (libpoppler) Shows Wrong Page Order
: 746053 (view as bug list)
Classification: openSUSE
Product: openSUSE 12.1
Classification: openSUSE
Component: Other
Other openSUSE 12.1
: P1 - Urgent : Critical (vote)
: ---
Assigned To: Vincent Untz
E-mail List
Depends on:
  Show dependency treegraph
Reported: 2012-02-22 07:25 UTC by Thomas Schraitle
Modified: 2012-04-02 11:08 UTC (History)
4 users (show)

See Also:
Found By: Documentation
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---

SUSE Manager API Documentation showing display problems in evince, okular, and xpdf (1.02 MB, application/pdf)
2012-02-22 07:25 UTC, Thomas Schraitle
Backported-to-0.18.4-Only-use-Hints-table-when-there-are-no-parse-errors.patch (5.85 KB, patch)
2012-02-29 18:02 UTC, Juergen Weigert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schraitle 2012-02-22 07:25:08 UTC
Created attachment 477242 [details]
SUSE Manager API Documentation showing display problems in evince, okular, and xpdf

How to proceed:

1. Start okular, evince, or xpdf.
2. Open the attached PDF in the reader
3. Browse through the PDF and you will see:
   a. Three pages which belong to the table of contents
   b. A chapter "Sample Scripts"
   c. A chapter "Frequently Asked Questions"
   d. A chapter "Namespaces 1: activationkey"
   e. The table of contents continued

The pages b, c, and d must not be there. The table of contents is interrupted by these pages. This is obviously wrong. Interestingly, everything else is fine.

As all three applications share the common library libpoppler, it should be very likely this is the piece to blame. :)

However, when viewed with Adobe Acrobat reader or GhostScript (gs), the PDF is correctly displayed.

Another issue, maybe related: When starting evince or xpdf on the command line, they give the following error message:

Error: Missing 'endstream'
Comment 1 Thomas Schraitle 2012-02-22 07:30:52 UTC

Process the PDF with pdfjam (package texlive-bin):

 $ pdfjam book_susemanager_apidoc.pdf  --outfile good.pdf

After this treatment, the PDF seems to be "healed" and can be viewed by evince, okular, and xpdf again.

However, this is NOT the solution! It's just a workaround.

Maybe related:
 "evince has trouble displaying pages in PDF file"
Comment 2 Karl Eichwalder 2012-02-22 07:33:07 UTC
As Frank found, this is also in the RH Bugzilla:


This is rather serious.  It kept us busy for several days.  If a fix takes
longer, I'd vote to downgrade libpoppler.
Comment 3 Thomas Schraitle 2012-02-22 07:45:26 UTC
Addendum 2:

$ cat /etc/SuSE-release 
openSUSE 12.1 (x86_64)
VERSION = 12.1
CODENAME = Asparagus

$ acroread -version

$ okular --version
Qt: 4.7.4
KDE Development Platform: 4.7.4 (4.7.4) "release 11"
Okular: 0.13.3

$ evince --version
GNOME Document Viewer 3.2.1

$ xpdf -v
xpdf version 3.02
Copyright 1996-2007 Glyph & Cog, LLC

$ rpm -q libpoppler18 
Comment 4 Karl Eichwalder 2012-02-22 07:53:25 UTC
Vincent, this seems to belong to your domain.
Comment 5 Juergen Weigert 2012-02-22 10:09:25 UTC
(In reply to comment #1)
>  $ pdfjam book_susemanager_apidoc.pdf  --outfile good.pdf
there is a page range missing. This should be:

$ pdfjam book_susemanager_apidoc.pdf - --outfile good.pdf

(note the extra lonely minus char, which means all pages...)
Comment 6 Juergen Weigert 2012-02-22 10:15:56 UTC
adding bili to CC, any ideas
Comment 7 Vincent Untz 2012-02-22 14:42:43 UTC
I filed the bug upstream: https://bugs.freedesktop.org/show_bug.cgi?id=46459

I don't really have time to do a real investigation, though.

(In reply to comment #2)
> This is rather serious.  It kept us busy for several days.  If a fix takes
> longer, I'd vote to downgrade libpoppler.

Unfortunately, we can't downgrade: the ABI of libpoppler is changing every now and then, and downgrading wouldn't help apps to use the new code unless we rebuild all of them. And instead, we'd get security issues, I guess.
Comment 8 Juergen Weigert 2012-02-29 18:02:55 UTC
Created attachment 478682 [details]

Hib Eris provides this patch via https://bugs.freedesktop.org/show_bug.cgi?id=46459

The document from attachment 477242 [details] seems to contain an incorrect Hints table:
- the specified length of the stream of the Hints table is incorrect.
- even with a corrected length, parsing the hints table stream results in
incorrect page offsets.

I think the best thing to do here is to not parse the hints table because of
the incorrect stream length.
Comment 9 Vincent Untz 2012-03-02 08:57:23 UTC
Can someone try the package from home:vuntz:branches:openSUSE:12.1:Update/poppler and double-checks it fixes the issue?
Comment 10 Thomas Schraitle 2012-03-02 09:11:47 UTC
Thanks Vincent!
Probably I'm blind, but I can't find your repo. Neither in OBS nor IBS. Do you have a link? :)
Comment 11 Vincent Untz 2012-03-02 09:30:50 UTC
Sorry, it wasn't published by default, here it is: http://download.opensuse.org/repositories/home:/vuntz:/branches:/openSUSE:/12.1:/Update/standard/
Comment 12 Thomas Schraitle 2012-03-06 07:42:48 UTC
Thanks Vincent for the bugfix. 
After I've installed the packages libpoppler-glib8, libpoppler18, and poppler-tools it works!
Thanks a lot!
Comment 13 Thomas Schraitle 2012-03-06 07:44:27 UTC
I'll create a NEEDINFO for Julian to confirm if it works.
Comment 14 Julian Zwickl 2012-03-06 13:41:15 UTC
Works for me.
Comment 15 Thomas Schraitle 2012-03-06 13:54:04 UTC
Ok, I think, we can close this bug for now.

Thanks to all! :-)
Comment 16 Tanja Roth 2012-03-06 14:17:51 UTC
This was a very annoying bug, many thanks for fixing it!
From the repo name that Vincent posted, I guess it will be available soon as an online update for 12.1?
Comment 17 Vincent Untz 2012-03-06 14:33:39 UTC
(In reply to comment #16)
> From the repo name that Vincent posted, I guess it will be available soon as an
> online update for 12.1?

No, we need to ask maintenance.
Comment 19 Dirk Mueller 2012-03-13 12:25:28 UTC
Ok, please submit to openSUSE:12.1:Update:Test
Comment 20 Vincent Untz 2012-03-13 12:37:42 UTC
Comment 21 Bernhard Wiedemann 2012-03-13 13:00:11 UTC
This is an autogenerated message for OBS integration:
This bug (748257) was mentioned in
https://build.opensuse.org/request/show/109103 12.1 / poppler
Comment 22 Frank Sundermeyer 2012-03-23 13:34:09 UTC
*** Bug 746053 has been marked as a duplicate of this bug. ***
Comment 23 Swamp Workflow Management 2012-04-02 11:08:41 UTC
openSUSE-RU-2012:0446-1: An update that has one recommended fix can now be installed.

Category: recommended (moderate)
Bug References: 748257
CVE References: 
Sources used:
openSUSE 12.1 (src):    poppler-0.18.0-2.3.2, poppler-qt-0.18.0-2.3.1