Bug 100737 - pdfimages - cant read images
Summary: pdfimages - cant read images
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: utils (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-20 10:04 UTC by clark
Modified: 2017-04-21 21:57 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
failing PDF (91.12 KB, application/pdf)
2017-04-20 10:28 UTC, clark
Details
another failing PDF (61.92 KB, application/pdf)
2017-04-20 10:40 UTC, clark
Details
Patch to fix (4.23 KB, patch)
2017-04-21 10:01 UTC, Adrian Johnson
Details | Splinter Review

Description clark 2017-04-20 10:04:27 UTC
I experience a problem with some PDF files

Have also created a question on stackoverflow with more information
http://stackoverflow.com/questions/42467869/script-does-not-continue-after-command-line

Some of the answers seem to have a solution
Comment 1 Albert Astals Cid 2017-04-20 10:17:04 UTC
Since you already read that webpage, what about you tell us what we need to know instead of asking us to spend time to reach the knowledge you already have?
Comment 2 clark 2017-04-20 10:23:44 UTC
@dwarring said "just quickly, I'm pretty sure that this PDF is dying because the content stream contains an inline image started by and 'BI' followed by random data and ended by 'EI'. The Adobe engineers were having an off-day when they designed these operators, the problem being that situations arise where the binary data randomly contains 'EI' and makes the PDF unparsable. Some tools may handle this better, but ideally the producer of this image should avoid the use of inline images."
Comment 3 clark 2017-04-20 10:28:20 UTC
Created attachment 130937 [details]
failing PDF
Comment 4 clark 2017-04-20 10:40:12 UTC
Created attachment 130938 [details]
another failing PDF
Comment 5 clark 2017-04-20 10:40:46 UTC
And the command line :)

/var/bin/poppler-0.51.0/utils/pdfimages -list /var/test.pdf
Comment 6 Adrian Johnson 2017-04-21 10:01:47 UTC
Created attachment 130961 [details] [review]
Patch to fix
Comment 7 Albert Astals Cid 2017-04-21 13:24:02 UTC
Why the added
  "if writer"
?
Comment 8 Albert Astals Cid 2017-04-21 13:24:55 UTC
Ah right i see, you're calling
writeImageFile with a null param just to advance it.

Looks good to me, will you commit it?
Comment 9 Adrian Johnson 2017-04-21 13:33:38 UTC
Pushed
Comment 10 clark 2017-04-21 21:57:37 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.