pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Silvan Eugen Lincan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PDFBOX-4221) Numbers of source Raster bands and source color space components do not match
Date Tue, 15 May 2018 12:50:00 GMT

     [ https://issues.apache.org/jira/browse/PDFBOX-4221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Silvan Eugen Lincan updated PDFBOX-4221:
----------------------------------------
    Description: 
When trying to convert from PDF to Image the attached example PDF [^Test_PDFToImage_IllegalArgumentException.pdf],
the following exception is thrown:
{code:java}
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){code}
The issue can be reproduced using the CmdLine Tools:
{code:java}
java -jar pdfbox-app-2.0.9.jar PDFToImage -dpi 200 -color rgb -imageType png -time Test_PDFToImage_IllegalArgumentException.pdf
{code}
Would be really great if you can look to this issue also.
 Thank you very much for your great work.

  was:
When trying to convert from PDF to Image the attached example PDF, the following exception
is thrown:
{code:java}
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){code}
The issue can be reproduced using the CmdLine Tools:
{code:java}
java -jar pdfbox-app-2.0.9.jar PDFToImage -dpi 200 -color rgb -imageType png -time Test_PDFToImage_IllegalArgumentException.pdf
{code}
Would be really great if you can look to this issue also.
 Thank you very much for your great work.


> Numbers of source Raster bands and source color space components do not match
> -----------------------------------------------------------------------------
>
>                 Key: PDFBOX-4221
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4221
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.9
>         Environment: Command-Line Tools: PDFToImage
>            Reporter: Silvan Eugen Lincan
>            Priority: Major
>         Attachments: Test_PDFToImage_IllegalArgumentException.pdf
>
>
> When trying to convert from PDF to Image the attached example PDF [^Test_PDFToImage_IllegalArgumentException.pdf],
the following exception is thrown:
> {code:java}
> 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){code}
> The issue can be reproduced using the CmdLine Tools:
> {code:java}
> java -jar pdfbox-app-2.0.9.jar PDFToImage -dpi 200 -color rgb -imageType png -time Test_PDFToImage_IllegalArgumentException.pdf
> {code}
> Would be really great if you can look to this issue also.
>  Thank you very much for your great work.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Mime
View raw message