pdfimages does not seem to be able to extract an inline jpeg image, instead it will output the image as an uncompressed ppm file. This was tested with poppler-utils 0.12.0 on Ubuntu 9.10. How to duplicate: Create an inline jpeg in a pdf file. This can be done with sam2p http://code.google.com/p/sam2p/ using the command "sam2p image.jpg image.pdf". Try to extract the jpeg back out with "pdfimages -j image.pdf image". This will create image-000.ppm instead of the expected image-000.jpg. If you instead create a pdf using XObjects, such as "sam2p -pdf:2 image.jpg image.pdf", the jpeg is correctly extracted, md5sums of image.jpg and image-000.jpg match. Note: this bug is present in the latest xpdf package as well.
Please provide a pdf with that problem.
Created attachment 32076 [details] example pdf Attached is a sample pdf with an inline image created with sam2p.
FYI, I also reported this bug to the author of xpdf, here was his response: "The issue is that there is no good way to find the end of an inline image data stream without parsing the data. So I would need code that read the JPEG data without decompressing it - just doing enough parsing to find the end of the JPEG stream. That's probably not too hard to do, but it's not high on my priority list." Thanks.
Same answer, if anyone is interested to code a patch, you need to start looking at ImageOutputDev.cc the problem lies in that the drawImg call is "inlineImg" so you can't know the length of the stream, and you need to work a bit more. Patches welcome since this is also not high priority for us either.
Created attachment 84828 [details] [review] extra inline images Patch to extract inline images.
The patch looks a bit complicated but i guess there's nothing more you can actually do. Have you run this over all the files with and without the reusableA bit set?
(In reply to comment #6) > Have you run this over all the files with and without the reusableA bit set? yes
Created attachment 133545 [details] [review] extract inline images v2 Rebased to master
good i guess
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.