Decoding a specific PDF 1.6 file generated by InDesign CS3 5.0.4 / Adobe PDF Library 8.0 fails with lots of these errors: **** Warning: File has insufficient data for an image. error: cannot decode code stream unable to decode JPX image data. Decoding fails on: Debian Squeeze x86_64, gs 8.71, libjasper 1.900.1 Ubuntu 11.10 i386, gs 9.04, libjasper 1.900.1 Mac OS X 10.7.1 x86_64, gs 9.02, libjasper 1.900.1 Decoding works on: Debian Lenny i386, gs 8.62 (according to ldd libjasper is not dynamically linked). URL to the problematic file (~8 MB): http://www.engelkemper.de/pdf/kataloge/fachtechnik/cem-bear.pdf
Thank you for using and testing Ghostscript. I cannot reproduce this on vv. 9.01, 9.02, or 9.04 compiled from sources on AMD64 Linux with a compiled-in Jasper. Vv. 8.71 and 9.00 fail on 2nd page with "/rangecheck in --run--". In any case, the upcoming release, v. 9.05, will use OpenJpeg library instead of Jasper. This version also works fine. This bug report may indicate a problem with a dynamic libraries, but it is moot now, when Jasper is about to be replaced.
The affected versions all used a dynamically linked libjasper 1.900.1, what version is the built-in libjasper?
(In reply to comment #2) > The affected versions all used a dynamically linked libjasper 1.900.1, what > version is the built-in libjasper? I believe the JasPer supplied with, and normally used in, Ghostscript contains additional patches to the last released version of JasPer. I also understand these patches have been supplied to the JasPer developers. I would suggest either rebuilding Ghostscript using the supplied JasPer source instead of dynamically linking, or waiting until the next release (9.05) is available, which will be in a few weeks.
Ghostscript comes with JasPer 1.701.0-gs5
(In reply to comment #2) > The affected versions all used a dynamically linked libjasper 1.900.1, what > version is the built-in libjasper? I believe out of all the bundled libraries, zlib, libpng, freetype, are more or less as upstream; libjpeg has a small number of enhancements/bug-fixes which were not taken up by upstream; the same probably applies to some of the other libraries (libtiff, libcms/libcms2); libjasper is the one which contains subtantial enhancements/bug-fixes which were not taken up by upsteam.