pdfbox 3.x, is it recommended to include jai-imageio when I am already using twelvemonkeys?

86 Views Asked by At

I am already using twelvemonkeys tiff and jpeg along with pdfbox 3.0.1

        <dependency>
            <groupId>com.twelvemonkeys.imageio</groupId>
            <artifactId>imageio-jpeg</artifactId>
            <version>3.10.1</version>
        </dependency>

        <dependency>
            <groupId>com.twelvemonkeys.imageio</groupId>
            <artifactId>imageio-tiff</artifactId>
            <version>3.10.1</version>
        </dependency>

In that case, is it still recommended to include jai-imageio dependencies? to be exact:

        <dependency>
            <groupId>com.github.jai-imageio</groupId>
            <artifactId>jai-imageio-jpeg2000</artifactId>
            <version>1.4.0</version>
        </dependency>

I am not sure if including all 3 of them as my project's dependency will increase my compatibility with different pdf files?

Or are they going to somehow conflict with each other and make the final results less deterministic?

1

There are 1 best solutions below

0
Cui Pengfei 崔鹏飞 On

Got an answer from the apache mailing list: https://lists.apache.org/thread/fok5thbqcphh2bp3y88s7myp5j870zb3 -

You should use all of these (including the jai-imageio-corewhich is required for jpeg2000) except the one for tiff. That one isn't needed but you can if you are creating TIFF files. It is not needed for decoding CCITT content in PDF files. (However our CCITT encoder / decoder is copied from the twelvemonkeys project) AFAIK the twelvemonkeys plugin puts itself in front of the other plugins.

(by Tilman Hausherr)