Bug 92482 - Omits one page, duplicates next page
Summary: Omits one page, duplicates next page
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
: 89215 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-15 21:27 UTC by Chris Francis
Modified: 2016-07-20 22:48 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
pdf of a journal paper (619.78 KB, text/plain)
2015-10-15 21:27 UTC, Chris Francis
Details
Modified PDF set Linearized to 0 (619.78 KB, application/pdf)
2016-03-14 15:07 UTC, Thomas Freitag
Details
implement sanity check for linearization usage (2.39 KB, patch)
2016-03-17 12:17 UTC, Thomas Freitag
Details | Splinter Review

Description Chris Francis 2015-10-15 21:27:39 UTC
Created attachment 118906 [details]
pdf of a journal paper

When I open the attached file I find that page 3 (labelled p. 1375 in the document) is missing and page 4 (p. 1376) occurs twice.  

This happens both with Evince 3.10.3 and qpdfview 0.4.7 (under Ubuntu 14.04), but not with Acrobat (under XP).
Comment 1 Thomas Freitag 2016-03-14 15:04:13 UTC
It seems as if an application without knowledge of Linearized PDF (s. spec, annex F) has modified the PDF without modifying the linearized document structure.
If poppler detects that it is a linearized PDF it uses this document structure as far as possible for a faster page success but without scanning the complete linearized document structure first. Just if it cannot detect the page using the hint tables it falls back to the catalog dir tree.
In this case page 1 and 2 are correct in the linearized structure, page 3 points to page 4 in the linearized structure and from page 4 on it fails to get the pages and uses the catalog dir tree, s. attached output from pdftoppm. If I mark the PDF as not linearized or if I save it again with acrobat professional I get the expected output again!

./utils/pdftoppm -png -cropbox 92482.open/BesbeasMorgan14.pdf output/92482
Syntax Warning: Object (32 0) is not a pageDict
Syntax Warning: Failed parsing page 4 using hint tables
Syntax Warning: Object (32 0) is not a pageDict
Syntax Warning: Failed parsing page 4 using hint tables
Syntax Warning: Object (32 0) is not a pageDict
Syntax Warning: Failed parsing page 4 using hint tables
Syntax Warning: Object (32 0) is not a pageDict
Syntax Warning: Failed parsing page 4 using hint tables
Syntax Warning: Object (32 0) is not a pageDict
Syntax Warning: Failed parsing page 4 using hint tables
Syntax Warning: Object (32 0) is not a pageDict
Syntax Warning: Failed parsing page 4 using hint tables
Syntax Warning: Object (32 0) is not a pageDict
Syntax Warning: Failed parsing page 4 using hint tables
Syntax Warning: Object (32 0) is not a pageDict
Syntax Warning: Failed parsing page 4 using hint tables
Syntax Warning: Object (32 0) is not a pageDict
Syntax Warning: Failed parsing page 4 using hint tables
Syntax Warning: Object (32 0) is not a pageDict
Syntax Warning: Failed parsing page 4 using hint tables
Syntax Warning: Object (59 0) is not a pageDict
Syntax Warning: Failed parsing page 5 using hint tables
Syntax Warning: Object (59 0) is not a pageDict
Syntax Warning: Failed parsing page 5 using hint tables
Syntax Warning: Object (59 0) is not a pageDict
Syntax Warning: Failed parsing page 5 using hint tables
Syntax Warning: Object (59 0) is not a pageDict
Syntax Warning: Failed parsing page 5 using hint tables
Syntax Warning: Object (59 0) is not a pageDict
Syntax Warning: Failed parsing page 5 using hint tables
Syntax Warning: Object (59 0) is not a pageDict
Syntax Warning: Failed parsing page 5 using hint tables
Syntax Warning: Object (59 0) is not a pageDict
Syntax Warning: Failed parsing page 5 using hint tables
Syntax Warning: Object (59 0) is not a pageDict
Syntax Warning: Failed parsing page 5 using hint tables
Syntax Warning: Object (59 0) is not a pageDict
Syntax Warning: Failed parsing page 5 using hint tables
Syntax Warning: Object (59 0) is not a pageDict
Syntax Warning: Failed parsing page 5 using hint tables
Syntax Warning: Object (70 0) is not a pageDict
Syntax Warning: Failed parsing page 6 using hint tables
Syntax Warning: Object (70 0) is not a pageDict
Syntax Warning: Failed parsing page 6 using hint tables
Syntax Warning: Object (70 0) is not a pageDict
Syntax Warning: Failed parsing page 6 using hint tables
Syntax Warning: Object (70 0) is not a pageDict
Syntax Warning: Failed parsing page 6 using hint tables
Syntax Warning: Object (70 0) is not a pageDict
Syntax Warning: Failed parsing page 6 using hint tables
Syntax Warning: Object (70 0) is not a pageDict
Syntax Warning: Failed parsing page 6 using hint tables
Syntax Warning: Object (70 0) is not a pageDict
Syntax Warning: Failed parsing page 6 using hint tables
Syntax Warning: Object (70 0) is not a pageDict
Syntax Warning: Failed parsing page 6 using hint tables
Syntax Warning: Object (70 0) is not a pageDict
Syntax Warning: Failed parsing page 6 using hint tables
Syntax Warning: Object (70 0) is not a pageDict
Syntax Warning: Failed parsing page 6 using hint tables
Syntax Warning: Object (73 0) is not a pageDict
Syntax Warning: Failed parsing page 7 using hint tables
Syntax Warning: Object (73 0) is not a pageDict
Syntax Warning: Failed parsing page 7 using hint tables
Syntax Warning: Object (73 0) is not a pageDict
Syntax Warning: Failed parsing page 7 using hint tables
Syntax Warning: Object (73 0) is not a pageDict
Syntax Warning: Failed parsing page 7 using hint tables
Syntax Warning: Object (73 0) is not a pageDict
Syntax Warning: Failed parsing page 7 using hint tables
Syntax Warning: Object (73 0) is not a pageDict
Syntax Warning: Failed parsing page 7 using hint tables
Syntax Warning: Object (73 0) is not a pageDict
Syntax Warning: Failed parsing page 7 using hint tables
Syntax Warning: Object (73 0) is not a pageDict
Syntax Warning: Failed parsing page 7 using hint tables
Syntax Warning: Object (73 0) is not a pageDict
Syntax Warning: Failed parsing page 7 using hint tables
Syntax Warning: Object (73 0) is not a pageDict
Syntax Warning: Failed parsing page 7 using hint tables
Syntax Warning: Object (79 0) is not a pageDict
Syntax Warning: Failed parsing page 8 using hint tables
Syntax Warning: Object (79 0) is not a pageDict
Syntax Warning: Failed parsing page 8 using hint tables
Syntax Warning: Object (79 0) is not a pageDict
Syntax Warning: Failed parsing page 8 using hint tables
Syntax Warning: Object (79 0) is not a pageDict
Syntax Warning: Failed parsing page 8 using hint tables
Syntax Warning: Object (79 0) is not a pageDict
Syntax Warning: Failed parsing page 8 using hint tables
Syntax Warning: Object (79 0) is not a pageDict
Syntax Warning: Failed parsing page 8 using hint tables
Syntax Warning: Object (79 0) is not a pageDict
Syntax Warning: Failed parsing page 8 using hint tables
Syntax Warning: Object (79 0) is not a pageDict
Syntax Warning: Failed parsing page 8 using hint tables
Syntax Warning: Object (79 0) is not a pageDict
Syntax Warning: Failed parsing page 8 using hint tables
Syntax Warning: Object (79 0) is not a pageDict
Syntax Warning: Failed parsing page 8 using hint tables
Syntax Warning: Object (104 0) is not a pageDict
Syntax Warning: Failed parsing page 9 using hint tables
Syntax Warning: Object (104 0) is not a pageDict
Syntax Warning: Failed parsing page 9 using hint tables
Syntax Warning: Object (104 0) is not a pageDict
Syntax Warning: Failed parsing page 9 using hint tables
Syntax Warning: Object (104 0) is not a pageDict
Syntax Warning: Failed parsing page 9 using hint tables
Syntax Warning: Object (104 0) is not a pageDict
Syntax Warning: Failed parsing page 9 using hint tables
Syntax Warning: Object (104 0) is not a pageDict
Syntax Warning: Failed parsing page 9 using hint tables
Syntax Warning: Object (104 0) is not a pageDict
Syntax Warning: Failed parsing page 9 using hint tables
Syntax Warning: Object (104 0) is not a pageDict
Syntax Warning: Failed parsing page 9 using hint tables
Syntax Warning: Object (104 0) is not a pageDict
Syntax Warning: Failed parsing page 9 using hint tables
Syntax Warning: Object (104 0) is not a pageDict
Syntax Warning: Failed parsing page 9 using hint tables
Syntax Warning: Object (131 0) is not a pageDict
Syntax Warning: Failed parsing page 10 using hint tables
Syntax Warning: Object (131 0) is not a pageDict
Syntax Warning: Failed parsing page 10 using hint tables
Syntax Warning: Object (131 0) is not a pageDict
Syntax Warning: Failed parsing page 10 using hint tables
Syntax Warning: Object (131 0) is not a pageDict
Syntax Warning: Failed parsing page 10 using hint tables
Syntax Warning: Object (131 0) is not a pageDict
Syntax Warning: Failed parsing page 10 using hint tables
Syntax Warning: Object (131 0) is not a pageDict
Syntax Warning: Failed parsing page 10 using hint tables
Syntax Warning: Object (131 0) is not a pageDict
Syntax Warning: Failed parsing page 10 using hint tables
Syntax Warning: Object (131 0) is not a pageDict
Syntax Warning: Failed parsing page 10 using hint tables
Syntax Warning: Object (131 0) is not a pageDict
Syntax Warning: Failed parsing page 10 using hint tables
Syntax Warning: Object (131 0) is not a pageDict
Syntax Warning: Failed parsing page 10 using hint tables
Comment 2 Thomas Freitag 2016-03-14 15:07:19 UTC
Created attachment 122277 [details]
Modified PDF set Linearized to 0

Here the corrected PDF which is displayed correctly
Comment 3 Thomas Freitag 2016-03-15 11:00:46 UTC
*** Bug 89215 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Freitag 2016-03-17 12:17:06 UTC
Created attachment 122373 [details] [review]
implement sanity check for linearization usage

With this patch it falls back to the catalog tree
Comment 5 Albert Astals Cid 2016-03-20 11:40:58 UTC
Pushed
Comment 6 Chris Francis 2016-07-20 10:07:42 UTC
I am grateful for the effort that has been put into investigating, and responding to, this bug report.  

However, the current bug status - RESOLVED FIXED - seems completely inappropriate: the bug I reported in poppler still exists in poppler.  poppler is unable to satisfactorily render a slightly mangled pdf which poses no problems to acrobat.
Comment 7 Jason Crain 2016-07-20 14:50:41 UTC
(In reply to Chris Francis from comment #6)
> However, the current bug status - RESOLVED FIXED - seems completely
> inappropriate: the bug I reported in poppler still exists in poppler. 
> poppler is unable to satisfactorily render a slightly mangled pdf which
> poses no problems to acrobat.

What's wrong with it?  I just tried it with a recent poppler and it looks fine to me.  What version of poppler are you using?
Comment 8 Chris Francis 2016-07-20 20:49:15 UTC
(In reply to Jason Crain from comment #7)
> (In reply to Chris Francis from comment #6)
> > However, the current bug status - RESOLVED FIXED - seems completely
> > inappropriate: the bug I reported in poppler still exists in poppler. 
> > poppler is unable to satisfactorily render a slightly mangled pdf which
> > poses no problems to acrobat.
> 
> What's wrong with it?  I just tried it with a recent poppler and it looks
> fine to me.  What version of poppler are you using?

I'm using Evince 3.10.3 - I don't know what version of poppler it uses (or how to find this out).  What version of poppler are you using?  Did you try it with the original pdf I attached with my bug report, or with the patched pdf?
Comment 9 Jason Crain 2016-07-20 21:39:17 UTC
(In reply to Chris Francis from comment #8)
> I'm using Evince 3.10.3 - I don't know what version of poppler it uses (or
> how to find this out).  What version of poppler are you using?  Did you try
> it with the original pdf I attached with my bug report, or with the patched
> pdf?

I used the one in the original report.  I verified that it works with a recent version of evince and poppler, and does not work with an old evince and poppler.

How to check software versions will depend on your distro.  Checking whatever package manager you use to install software should work.  But evince 3.10.3 is pretty old, from November 2013, so I expect your libpoppler is going to be old also.  To get this fix you'll need poppler version 0.43.0 or later, released April 2016.  And to do that you'll either need to compile the new version your self, or go through your distro to get newer software.
Comment 10 Chris Francis 2016-07-20 22:48:52 UTC
(In reply to Jason Crain from comment #9)
> How to check software versions will depend on your distro.  Checking
> whatever package manager you use to install software should work.  But
> evince 3.10.3 is pretty old, from November 2013, so I expect your libpoppler
> is going to be old also.  To get this fix you'll need poppler version 0.43.0
> or later, released April 2016.  And to do that you'll either need to compile
> the new version your self, or go through your distro to get newer software.

I'm using Ubuntu 14.04 LTS, and had assumed (perhaps naively) that the regular updates I get would include updates of packages like evince.  I also assumed  that the person who helpfully diagnosed the problem with the pdf and provided a patch for it would have told me (as you did) that my problem does not occur with later versions of poppler.  We live and learn.  

Thanks for your help.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.