Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 5.0, 5.0.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows 7, JDK 1.6

      Description

      When I try to convert the attached PDF it fails showing this as result:

      http://i.imgur.com/q0hvAob.png

      When trying on my product, the log shows the following:

      INFO: ICEsoft ICEpdf Core 5.0.0
      28-oct-2013 9:15:51 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:51 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:52 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:53 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:53 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:53 org.icepdf.core.util.Parser getObject
      WARNING: IO reading error.
      28-oct-2013 9:15:53 org.icepdf.core.util.LazyObjectLoader loadObject
      SEVERE: Error loading object instance: 20 0R
      java.io.IOException: Controlador no válido
      at java.io.RandomAccessFile.seek(Native Method)
      at org.icepdf.core.io.RandomAccessFileInputStream.seekAbsolute(RandomAccessFileInputStream.java:105)
      at org.icepdf.core.util.LazyObjectLoader.loadObject(LazyObjectLoader.java:74)
      at org.icepdf.core.util.Library.getObject(Library.java:123)
      at org.icepdf.core.util.Library.getObject(Library.java:173)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:224)
      at org.icepdf.core.pobjects.graphics.ImageStreamReference.run(ImageStreamReference.java:66)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      28-oct-2013 9:15:53 org.icepdf.core.util.LazyObjectLoader loadObject
      SEVERE: Error loading object instance: 20 0R
      java.io.IOException: Controlador no válido
      at java.io.RandomAccessFile.getFilePointer(Native Method)
      at org.icepdf.core.io.RandomAccessFileInputStream.getAbsolutePosition(RandomAccessFileInputStream.java:122)
      at org.icepdf.core.util.LazyObjectLoader.loadObject(LazyObjectLoader.java:70)
      at org.icepdf.core.util.Library.getObject(Library.java:123)
      at org.icepdf.core.util.Library.getObject(Library.java:173)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:224)
      at org.icepdf.core.pobjects.graphics.ImageStreamReference.run(ImageStreamReference.java:66)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      28-oct-2013 9:15:53 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:53 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:53 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:53 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:54 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:54 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:55 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:55 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:55 org.icepdf.core.util.LazyObjectLoader loadObject
      SEVERE: Error loading object instance: 20 0R
      java.io.IOException: Controlador no válido
      at java.io.RandomAccessFile.getFilePointer(Native Method)
      at org.icepdf.core.io.RandomAccessFileInputStream.getAbsolutePosition(RandomAccessFileInputStream.java:122)
      at org.icepdf.core.util.LazyObjectLoader.loadObject(LazyObjectLoader.java:70)
      at org.icepdf.core.util.Library.getObject(Library.java:123)
      at org.icepdf.core.util.Library.getObject(Library.java:173)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:224)
      at org.icepdf.core.pobjects.graphics.ImageStreamReference.run(ImageStreamReference.java:66)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      28-oct-2013 9:15:55 org.icepdf.core.util.Parser getObject
      WARNING: IO reading error.
      28-oct-2013 9:15:55 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:55 org.icepdf.core.util.LazyObjectLoader loadObject
      SEVERE: Error loading object instance: 20 0R
      java.io.IOException: Controlador no válido
      at java.io.RandomAccessFile.seek(Native Method)
      at org.icepdf.core.io.RandomAccessFileInputStream.seekAbsolute(RandomAccessFileInputStream.java:105)
      at org.icepdf.core.util.LazyObjectLoader.loadObject(LazyObjectLoader.java:74)
      at org.icepdf.core.util.Library.getObject(Library.java:123)
      at org.icepdf.core.util.Library.getObject(Library.java:173)
      at org.icepdf.core.pobjects.ImageStream.getImage(ImageStream.java:224)
      at org.icepdf.core.pobjects.graphics.ImageStreamReference.run(ImageStreamReference.java:66)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      28-oct-2013 9:15:55 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/
      28-oct-2013 9:15:55 org.icepdf.core.pobjects.ImageStream jpxDecode
      INFO: ImageIO missing required plug-in to read JPEG 2000 images. You can download the JAI ImageIO Tools from: https://jai-imageio.dev.java.net/


      I've tried installing JAI ImageIO but nothing changes.

        Activity

        Hide
        Patrick Corless added a comment -

        You'll need to make sure the JAI jars are on the class path for JPEG2000 support. Instructions can be found here, http://www.icesoft.org/wiki/display/PDF/Java+Advanced+Imaging+(JAI)+Library+for+Enhanced+Image+Support

        Show
        Patrick Corless added a comment - You'll need to make sure the JAI jars are on the class path for JPEG2000 support. Instructions can be found here, http://www.icesoft.org/wiki/display/PDF/Java+Advanced+Imaging+(JAI)+Library+for+Enhanced+Image+Support
        Hide
        Yassine El Bouamri added a comment -

        I already have jai_core.jar and jai_codec.jar in my classpath but in your links I couldn't find jai_imageio.jar (Platform independent). Anyway, I've found it here: http://www.java2s.com/Code/JarDownload/jai/jai_imageio-1.1.jar.zip

        But still not working and prints the same output. Is it the wrong jar?

        Show
        Yassine El Bouamri added a comment - I already have jai_core.jar and jai_codec.jar in my classpath but in your links I couldn't find jai_imageio.jar (Platform independent). Anyway, I've found it here: http://www.java2s.com/Code/JarDownload/jai/jai_imageio-1.1.jar.zip But still not working and prints the same output. Is it the wrong jar?
        Hide
        Patrick Corless added a comment -

        I would recommend you download the 1.1.3 jars.

        http://download.java.net/media/jai/builds/release/1_1_3/
        jai_codec.jar
        jai_core.jar

        And the the imageio jars can be found here:
        http://download.java.net/media/jai-imageio/builds/release/1.1/
        Please read the insturctions carefully to property extract the
        clibwrapper_jiio.jar and jai_imageio.jar jars.

        The complete jar listing:
        clibwrapper_jiio.jar
        jai_codec.jar
        jai_core.jar
        jai_imageio.jar

        Show
        Patrick Corless added a comment - I would recommend you download the 1.1.3 jars. http://download.java.net/media/jai/builds/release/1_1_3/ jai_codec.jar jai_core.jar And the the imageio jars can be found here: http://download.java.net/media/jai-imageio/builds/release/1.1/ Please read the insturctions carefully to property extract the clibwrapper_jiio.jar and jai_imageio.jar jars. The complete jar listing: clibwrapper_jiio.jar jai_codec.jar jai_core.jar jai_imageio.jar
        Hide
        Yassine El Bouamri added a comment -

        Ok. Done. I have the four JARs in my /lib but still not working. I've extracted the other two jars from: jai_imageio-1_1-lib-windows-i586.exe. Installed and taken from the installation directory.

        Do I have to setup the Windows PATH variable (or the corresponding OS)? Can't just deploy the four JARs without depending on which OS is running my application? I don't know if that's the problem here...

        Show
        Yassine El Bouamri added a comment - Ok. Done. I have the four JARs in my /lib but still not working. I've extracted the other two jars from: jai_imageio-1_1-lib-windows-i586.exe. Installed and taken from the installation directory. Do I have to setup the Windows PATH variable (or the corresponding OS)? Can't just deploy the four JARs without depending on which OS is running my application? I don't know if that's the problem here...
        Hide
        Yassine El Bouamri added a comment -

        Any help?

        Show
        Yassine El Bouamri added a comment - Any help?
        Hide
        Patrick Corless added a comment -

        I don't have an issue loading the sample document. Here's what my class path looks like.

        java -Djava.util.logging.config.file=d:/svn/ossrepo/icepdf/trunk/icepdf/lib/logging.properties -Xmx1024m -XX:+UseParallelGC -Dfile.encoding=UTF-8 -classpath "\jai-1_1_3\lib\clibwrapper_jiio.jar;\jai-1_1_3\lib\jai_codec.jar;\jai-1_1_3\lib\jai_core.jar;\jai-1_1_3\lib\jai_imageio.jar;icepdf-core.jar;icepdf-pro.jar;icepdf-viewer.jar" org.icepdf.ri.viewer.Main

        If you have the 5.0.4 PRO binaries you can use the included ./lib/levigo-jbig2-imageio.jar to improve the loading speed of the jbig2Decode.

        Show
        Patrick Corless added a comment - I don't have an issue loading the sample document. Here's what my class path looks like. java -Djava.util.logging.config.file=d:/svn/ossrepo/icepdf/trunk/icepdf/lib/logging.properties -Xmx1024m -XX:+UseParallelGC -Dfile.encoding=UTF-8 -classpath "\jai-1_1_3\lib\clibwrapper_jiio.jar;\jai-1_1_3\lib\jai_codec.jar;\jai-1_1_3\lib\jai_core.jar;\jai-1_1_3\lib\jai_imageio.jar;icepdf-core.jar;icepdf-pro.jar;icepdf-viewer.jar" org.icepdf.ri.viewer.Main If you have the 5.0.4 PRO binaries you can use the included ./lib/levigo-jbig2-imageio.jar to improve the loading speed of the jbig2Decode.
        Hide
        Yassine El Bouamri added a comment -

        OK. I've got the solution! Seems like a Tomcat thing, but I needed to execute this line first:

        ImageIO.scanForPlugins();

        It forces to re-scan the classpath and load the required service provider classes. Maybe Tomcat loads the classpath libraries after the first scan of ImageIO. Don't know, but it worked.

        Thanks to this guy: http://thejavashop.net/blog/?p=27

        And thanks to you too.

        Show
        Yassine El Bouamri added a comment - OK. I've got the solution! Seems like a Tomcat thing, but I needed to execute this line first: ImageIO.scanForPlugins(); It forces to re-scan the classpath and load the required service provider classes. Maybe Tomcat loads the classpath libraries after the first scan of ImageIO. Don't know, but it worked. Thanks to this guy: http://thejavashop.net/blog/?p=27 And thanks to you too.
        Hide
        Patrick Corless added a comment -

        Thanks for posting back on "ImageIO.scanForPlugins();" I"m sure that will be useful for many users.

        Show
        Patrick Corless added a comment - Thanks for posting back on "ImageIO.scanForPlugins();" I"m sure that will be useful for many users.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Yassine El Bouamri
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: