Hello,

This has been fixed in

https://issues.apache.org/jira/browse/PDFBOX-5872

however it hasn't been released. You can get a snapshot here:
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/3.0.4-SNAPSHOT/

Tilman

On 27.08.2024 09:53, Marcus Linder wrote:
Hello,

we are using PDFBox version 3.0.0
We are trying to read  JPEG2000 images embedded in PDFs using the ImageIO 
plugins from de.digitalcollections.imageio.
For license reasons we are not allowed to use the plugin of 
jai-imageio-jpeg2000.

The problem:
When debugging the readJPX() method of the JPXFilter.java class from the 
org.apache.pdfbox.filter package, we noticed that the image is only read via the
reader.read() method.

Nevertheless, the reader also checks whether the canReadRaster() function is 
fulfilled (in our opinion, this is not necessary for what is done with the 
reader afterwards).
This is done in the first line of the readJPX() method by calling the 
findImageReader() method of the Filter.java class. This calls the 
aforementioned canReadRaster() method of the abstract class ImageReader.java, 
which returns false by default.

Our reader (that of the de.digitalcollections.imageio plugin mentioned above) 
does NOT overwrite the canReadRaster() method, so the false of the super class 
is returned and the reading process is aborted.
As already mentioned above, we wonder about the call of the canReadRaster() 
method and the necessity for the further reading process.

Best regards,
Marcus Linder




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to