pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PDFBOX-4258) Numbers of source Raster bands and source color space components do not match
Date Tue, 03 Jul 2018 06:21:00 GMT

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

Vincent updated PDFBOX-4258:
----------------------------
    Description: 
Issue when converting PDF to image

*To respect privacy of the owner and my company policy I'm not allowed to send the PDF in
public. If you need the document please give me an email address on which I can send the document.*

Error :

Numbers of source Raster bands and source color space components do not match

Code :
{quote}List<BufferedImage> lo_result = new ArrayList<>();
 PDFRenderer lo_renderer = new PDFRenderer(lo_document);
 for (int i = 0; i < lo_document.getNumberOfPages(); ++i)
{           
       lo_result.add(lo_renderer.renderImageWithDPI(i, 300, ImageType.RGB));
}
{quote}
Stacktrace :
{quote}{{[7/3/18 8:06:46:662 CEST] 00000170 SystemErr     R java.lang.IllegalArgumentException:
Numbers of source Raster bands and source color space components do not match
 [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:493)
 [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1292)
 [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native
Method)
 [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1259)
 [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1062)
 [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.filter.DCTFilter.decode(DCTFilter.java:91)
 [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:77)
 [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:175)
 [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:241)
 [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createInputStream(PDImageXObject.java:701)
 [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.from8bit(SampledImageReader.java:367)java.lang.IllegalArgumentException:
Numbers of source Raster bands and source color space components do not match
 [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:225)
 [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R 
 [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:443)
 [7/3/18 8:06:46:664 CEST] 00000171 SystemErr     R     at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:493)  
 at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:424)
 [7/3/18 8:06:46:664 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1292)
 [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PageDrawer.drawImage(PageDrawer.java:1046)
 [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native
Method)
 [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:62)
 [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1259)
 [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:848)
 [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1062)
 [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:503)
 [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.filter.DCTFilter.decode(DCTFilter.java:91)
 [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:477)
 [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:77)
 [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
 [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:175)
 [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:246)
 [7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:241)
 [7/3/18 8:06:46:666 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:225)
 [7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createInputStream(PDImageXObject.java:701)
 [7/3/18 8:06:46:666 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:164)
 [7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.from8bit(SampledImageReader.java:367)
 [7/3/18 8:06:46:666 CEST] 00000170 SystemErr     R     at be.ulg.segi.penelope.mypen.view.action.divers.files.FileManagementTools.toImages(FileManagementTools.java:125)
 [7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:225)}}
{quote}

  was:
Issue when converting PDF to image

*To respect privacy of the owner and my company policy I'm not allowed to send the PDF in
public. If you need the document please give me an email address on which I can send the document.*

Error : 

Numbers of source Raster bands and source color space components do not match

Code : 
{quote}{{        List<BufferedImage> lo_result = new ArrayList<>();
        PDFRenderer lo_renderer = new PDFRenderer(lo_document);
        for (int i = 0; i < lo_document.getNumberOfPages(); ++i)
        {
            lo_result.add(lo_renderer.renderImageWithDPI(i, 300, ImageType.RGB));
        }}}
{quote}
Stacktrace :
{quote}{{[7/3/18 8:06:46:662 CEST] 00000170 SystemErr     R java.lang.IllegalArgumentException:
Numbers of source Raster bands and source color space components do not match
[7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:493)
[7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1292)
[7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native
Method)
[7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1259)
[7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1062)
[7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.filter.DCTFilter.decode(DCTFilter.java:91)
[7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:77)
[7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:175)
[7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:241)
[7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createInputStream(PDImageXObject.java:701)
[7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.from8bit(SampledImageReader.java:367)java.lang.IllegalArgumentException:
Numbers of source Raster bands and source color space components do not match
[7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:225)
[7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R 
[7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:443)
[7/3/18 8:06:46:664 CEST] 00000171 SystemErr     R     at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:493)  
 at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:424)
[7/3/18 8:06:46:664 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1292)
[7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PageDrawer.drawImage(PageDrawer.java:1046)
[7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native
Method)
[7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:62)
[7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1259)
[7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:848)
[7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1062)
[7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:503)
[7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.filter.DCTFilter.decode(DCTFilter.java:91)
[7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:477)
[7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:77)
[7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
[7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:175)
[7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:246)
[7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:241)
[7/3/18 8:06:46:666 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:225)
[7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createInputStream(PDImageXObject.java:701)
[7/3/18 8:06:46:666 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:164)
[7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.from8bit(SampledImageReader.java:367)
[7/3/18 8:06:46:666 CEST] 00000170 SystemErr     R     at be.ulg.segi.penelope.mypen.view.action.divers.files.FileManagementTools.toImages(FileManagementTools.java:125)
[7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:225)}}{quote}


> Numbers of source Raster bands and source color space components do not match
> -----------------------------------------------------------------------------
>
>                 Key: PDFBOX-4258
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4258
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.10
>            Reporter: Vincent
>            Priority: Major
>
> Issue when converting PDF to image
> *To respect privacy of the owner and my company policy I'm not allowed to send the PDF
in public. If you need the document please give me an email address on which I can send the
document.*
> Error :
> Numbers of source Raster bands and source color space components do not match
> Code :
> {quote}List<BufferedImage> lo_result = new ArrayList<>();
>  PDFRenderer lo_renderer = new PDFRenderer(lo_document);
>  for (int i = 0; i < lo_document.getNumberOfPages(); ++i)
> {           
>        lo_result.add(lo_renderer.renderImageWithDPI(i, 300, ImageType.RGB));
> }
> {quote}
> Stacktrace :
> {quote}{{[7/3/18 8:06:46:662 CEST] 00000170 SystemErr     R java.lang.IllegalArgumentException:
Numbers of source Raster bands and source color space components do not match
>  [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:493)
>  [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1292)
>  [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native
Method)
>  [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1259)
>  [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1062)
>  [7/3/18 8:06:46:663 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.filter.DCTFilter.decode(DCTFilter.java:91)
>  [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:77)
>  [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:175)
>  [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:241)
>  [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createInputStream(PDImageXObject.java:701)
>  [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.from8bit(SampledImageReader.java:367)java.lang.IllegalArgumentException:
Numbers of source Raster bands and source color space components do not match
>  [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:225)
>  [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R 
>  [7/3/18 8:06:46:664 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:443)
>  [7/3/18 8:06:46:664 CEST] 00000171 SystemErr     R     at java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:493)  
 at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:424)
>  [7/3/18 8:06:46:664 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(JPEGImageReader.java:1292)
>  [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PageDrawer.drawImage(PageDrawer.java:1046)
>  [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native
Method)
>  [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:62)
>  [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1259)
>  [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:848)
>  [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1062)
>  [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:503)
>  [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.filter.DCTFilter.decode(DCTFilter.java:91)
>  [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:477)
>  [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:77)
>  [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
>  [7/3/18 8:06:46:665 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:175)
>  [7/3/18 8:06:46:665 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:246)
>  [7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:241)
>  [7/3/18 8:06:46:666 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:225)
>  [7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createInputStream(PDImageXObject.java:701)
>  [7/3/18 8:06:46:666 CEST] 00000170 SystemErr     R     at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:164)
>  [7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.from8bit(SampledImageReader.java:367)
>  [7/3/18 8:06:46:666 CEST] 00000170 SystemErr     R     at be.ulg.segi.penelope.mypen.view.action.divers.files.FileManagementTools.toImages(FileManagementTools.java:125)
>  [7/3/18 8:06:46:666 CEST] 00000171 SystemErr     R     at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:225)}}
> {quote}



--
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