Bug 86063 - pdfseparate breaks xref table
Summary: pdfseparate breaks xref table
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: Other OpenBSD
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-09 15:56 UTC by hans@stare.cz
Modified: 2014-11-13 11:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
A PDF file with two pages (13.02 KB, text/plain)
2014-11-09 15:56 UTC, hans@stare.cz
Details
An input PDF file with two pages (13.58 KB, application/pdf)
2014-11-09 15:59 UTC, hans@stare.cz
Details
The first page, extracted by pdfseparate (14.06 KB, application/pdf)
2014-11-09 16:00 UTC, hans@stare.cz
Details
The second page, extracted by pdfseparate (14.07 KB, application/pdf)
2014-11-09 16:01 UTC, hans@stare.cz
Details
write correct size in trailer dict (1.58 KB, patch)
2014-11-10 12:56 UTC, Thomas Freitag
Details | Splinter Review

Description hans@stare.cz 2014-11-09 15:56:33 UTC
Created attachment 109153 [details]
A PDF file with two pages

The PDF files produced by pdfseparate appear to have a broken xref table.
It is trivially repeatable - an input file and two page files attached,
process with "pdfseparate file.pdf page-%d.pdf"

For example, this is what mupdf says when trying to view such a file:

$ mupdf page-1.pdf
warning: broken xref section, proceeding anyway.
warning: ... repeated 2 times ...

This happens with all files I have tried.
Comment 1 hans@stare.cz 2014-11-09 15:59:25 UTC
Created attachment 109154 [details]
An input PDF file with two pages
Comment 2 hans@stare.cz 2014-11-09 16:00:07 UTC
Created attachment 109155 [details]
The first page, extracted by pdfseparate
Comment 3 hans@stare.cz 2014-11-09 16:01:01 UTC
Created attachment 109156 [details]
The second page, extracted by pdfseparate
Comment 4 hans@stare.cz 2014-11-09 16:01:47 UTC
This is on 0.26.5 as installed by the OpenBSD port.
Comment 5 Thomas Freitag 2014-11-10 09:37:03 UTC
I think You should ask the mupdf developper why mupdf means that the xref section is broken. I looked into the PDFs with a text editor and can't find any problems in the separated pages, poppler can use these PDFs without any problems and even acrobat reader and/or professional doesn't find any problems.
Comment 6 hans@stare.cz 2014-11-10 11:31:57 UTC
Here is a description of what exactly is wrong with the file:

http://bugs.ghostscript.com/show_bug.cgi?id=695672
Comment 7 Thomas Freitag 2014-11-10 12:56:40 UTC
Created attachment 109218 [details] [review]
write correct size in trailer dict

Okay, the mupdf developper are right. Haven't encountered that until now because nobody cares beside mupdf.

@Albert: this patch writes the correct size entry in the trailer dict according spec 32000-1
Comment 8 Albert Astals Cid 2014-11-13 11:27:02 UTC
Pushed :)


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.