You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've found that when you have a PDF with embedded images that were encoded with JBIG or with JP2, the shaded cantaloupe.jar can't find the org.apache.pdfbox:jbig2-imageio library. Similarly we can't get jai-imageio-jpeg2000 to work in the PDFs. I am able to get them to work by adding the jars independently to the classpath on startup like so
Ah, I understand the issue now. The jbig2-imageio library comes with a file in META-INF/services in the jar called META-INF/services/javax.imageio.spi.ImageReaderSpi but you would potentially have many of those based on the different plugins that implement that interface. Hence including multiple ImageIO plugins in a shaded JAR presents a problem.
This similar issue opened on the jai-imageio project suggests that the Maven Shade plugin should handle this but you have explicitly defined <exclude>META-INF/services/javax.imageio.*</exclude>. Were there other issues present when this wasn't explicitly excluded?
This must have got broken in the war-to-jar switch. I don't remember why the javax.imageio.* services were being excluded. It should be fixed now, and hopefully the fix didn't break something else.
We've found that when you have a PDF with embedded images that were encoded with JBIG or with JP2, the shaded cantaloupe.jar can't find the
org.apache.pdfbox:jbig2-imageio
library. Similarly we can't getjai-imageio-jpeg2000
to work in the PDFs. I am able to get them to work by adding the jars independently to the classpath on startup like soAttached is a PDF you can test with.
index.pdf
The text was updated successfully, but these errors were encountered: