Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
2.0.9
-
None
-
None
-
Command-Line Tools: PDFToImage
-
Important
Description
When trying to convert from PDF to Image the attached example PDF Test_PDFToImage_IllegalArgumentException.pdf, the following exception is thrown:
Exception in thread "main" java.lang.IllegalArgumentException: Numbers of source Raster bands and source color space components do not match at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:482) at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1280) at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method) at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1247) at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1050) at org.apache.pdfbox.filter.DCTFilter.decode(DCTFilter.java:91) at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:77) at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:175) at org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:241) at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createInputStream(PDImageXObject.java:676) at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.from8bit(SampledImageReader.java:352) at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:212) at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:421) at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:402) at org.apache.pdfbox.rendering.PageDrawer.drawImage(PageDrawer.java:1046) at org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:62) at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:848) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:503) at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:477) at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150) at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:246) at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:225) at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:164) at org.apache.pdfbox.tools.PDFToImage.main(PDFToImage.java:247) at org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:89)
The issue can be reproduced using the CmdLine Tools:
java -jar pdfbox-app-2.0.9.jar PDFToImage -dpi 200 -color rgb -imageType png -time Test_PDFToImage_IllegalArgumentException.pdf
Would be really great if you can look to this issue also.
Thank you very much for your great work.
Attachments
Attachments
Issue Links
- duplicates
-
PDFBOX-2128 CMYK images are not supported correctly
- Closed
- is duplicated by
-
PDFBOX-4258 Numbers of source Raster bands and source color space components do not match
- Closed
-
PDFBOX-4464 PDFRenderer ColorConverterOp Error
- Closed
-
PDFBOX-5036 IllegalArgumentException in PDImageXObject.getImage(): Numbers of source Raster bands and source color space components do not match
- Closed