jPod incompatibility with current jbig2.jar

  • Stefan

    Stefan - 2010-09-28

    While running jPod (jPodRenderer) with current jbig2.jar from in classpath I got this exception:

    Caused by: java.lang.NullPointerException
        at org.jpedal.jbig2.JBIG2Decoder.getPageAsJBIG2Bitmap(
        at de.intarsys.pdf.filter.JBIG2Filter.decode(

    The source of this exception is the supplied page index (..number) of 1 in
    de.intarsys.pdf.filter.JBIG2Filter.decode() :

            return decoder.getPageAsJBIG2Bitmap(1).getData(true);

    It seems that the convention for the page parameter changed in the meantime..
    Now the page numbering starts at 0 in org.jpedal.jbig2.JBIG2Decoder.getPageAsJBIG2Bitmap().

    Your packaged jbig2.jar counts from 1:

        public JBIG2Bitmap getPageAsJBIG2Bitmap(int i)
            return findPageSegement(i).getPageBitmap();

    Current jbig2.jar wants an 0 - based index:

        public JBIG2Bitmap getPageAsJBIG2Bitmap(int page)
            return streamDecoder.findPageSegement(page).getPageBitmap();

    Is it possible to fix the JBIG2Filter and deliver a newer jbig2.jar with the package?

  • mtraut

    mtraut - 2010-09-29

    we will change the deployment with the next release (which is not scheduled yet - can you live with a fork so far?).

  • mark stephens

    mark stephens - 2010-10-14

    Does this mean we are going to see a patch release sent back to the JPedal development team so we can add the fix into the main JBIG2 library?

  • Elfi Heck

    Elfi Heck - 2010-10-14

    I guess he meant we will fix our code to work with the newer jbig2.jar. (and package that one)

  • mark stephens

    mark stephens - 2010-10-14

    If you do find any issues, and you send us a patch, we will rebuild the jar and icepdf and bigfaceless also use that version in their PDF renderers.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks