Bug 88172 - Error: Page count in top-level pages object is wrong type (null)
Summary: Error: Page count in top-level pages object is wrong type (null)
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-07 19:02 UTC by Robert
Modified: 2015-01-08 19:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch (1.87 KB, patch)
2015-01-07 22:31 UTC, Albert Astals Cid
Details | Splinter Review

Description Robert 2015-01-07 19:02:33 UTC
I have two pdfs that spit out the error message below when using poppler utils. pdftk also couldn't open them. Mac Preview can open and display them.


pdftoppm E1_Galerieebene_20130717.pdf 
Syntax Error: Page count in top-level pages object is wrong type (null)
Wrong page range given: the first page (1) can not be after the last page (0).

pdftoppm U2_Tiefgaragenebene_20130717_\(1\).pdf 
Syntax Error: Page count in top-level pages object is wrong type (null)
Wrong page range given: the first page (1) can not be after the last page (0).

I can send a drop box link to these pdfs.

Is this a poppler fix or is there something wrong with the pdf?
Comment 1 Robert 2015-01-07 19:20:15 UTC
Oh yeah, tried 0.28.1 and 0.30.0
Comment 2 Albert Astals Cid 2015-01-07 19:39:09 UTC
Attach the files.
Comment 3 Robert 2015-01-07 19:53:33 UTC
Can I send you a dropbox link in email? They are a little sensitive.
Comment 4 Albert Astals Cid 2015-01-07 20:39:55 UTC
You can, i can't promise i will have a look, that's why adding them here makes them visible to more people and thus more chances to get it fixed.
Comment 5 Albert Astals Cid 2015-01-07 22:18:48 UTC
The document is broken but since gs and Adobe Reader render it and it's not hard to fix i'll fix it.
Comment 6 Albert Astals Cid 2015-01-07 22:31:49 UTC
Created attachment 111934 [details] [review]
Patch

Fellow Poppler devels, a review?

The problem with these files is that the catalog links directly to a page, i.e.

70 0 obj
<<
/Type /Catalog
/Pages 72 0 R
/Outlines 4 0 R
/OpenAction 74 0 R
>>
endobj
72 0 obj
<<
/Type /Page
/Parent 71 0 R
/Resources 2 0 R
/MediaBox [ 0 0 3370 2384 ]
/Contents 1 0 R
>>

So what i'm doing is if Catalog::Pages is a Page instead of a Pages i assume there's just a Page and carry on. Render and okular work

Shall i commit
Comment 7 Carlos Garcia Campos 2015-01-08 11:07:48 UTC
(In reply to Albert Astals Cid from comment #6)
> Created attachment 111934 [details] [review] [review]
> Patch
> 
> Fellow Poppler devels, a review?
> 
> The problem with these files is that the catalog links directly to a page,
> i.e.
> 
> 70 0 obj
> <<
> /Type /Catalog
> /Pages 72 0 R
> /Outlines 4 0 R
> /OpenAction 74 0 R
> >>
> endobj
> 72 0 obj
> <<
> /Type /Page
> /Parent 71 0 R
> /Resources 2 0 R
> /MediaBox [ 0 0 3370 2384 ]
> /Contents 1 0 R
> >>
> 
> So what i'm doing is if Catalog::Pages is a Page instead of a Pages i assume
> there's just a Page and carry on. Render and okular work
> 
> Shall i commit

LGTM
Comment 8 Albert Astals Cid 2015-01-08 19:14:15 UTC
Pushed
Comment 9 Robert 2015-01-08 19:31:07 UTC
Thanks!


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.