pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: Exception caused by logo image
Date Fri, 22 Apr 2016 21:39:14 GMT
Please upload the PDF somewhere, attachments don't go through.

You can also try to use twelvemonkeys instead of java imaging
https://github.com/haraldk/TwelveMonkeys
it works nicely for me.

Tilman

Am 22.04.2016 um 23:19 schrieb Joel Hirsh:
> Getting an exception on the logo in this file.  It is repeatable with 
> PrintImageLocations test program.  I tried this both in 2.0.0 and the 
> 2.0.1 development build from 4/22. If I delete the logo from the PDF 
> then the error goes away.
>
> The PDF with just the logo is attached.
>
> Looking at the pdfbox code it seems that it might just be an exception 
> that needs to be caught, and then try an alternative image parser.
>
> 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(Unknown Source)
> at com.sun.imageio.plugins.jpeg.JPEGImageReader.acceptPixels(Unknown 
> Source)
> at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImage(Native Method)
> at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(Unknown 
> Source)
> at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(Unknown Source)
> at javax.imageio.ImageReader.read(Unknown Source)
> at org.apache.pdfbox.filter.DCTFilter.decode(DCTFilter.java:83)
> at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:69)
> at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:163)
> at 
> org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:235)
> at 
> org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.<init>(PDImageXObject.java:147)
> at 
> org.apache.pdfbox.pdmodel.graphics.PDXObject.createXObject(PDXObject.java:70)
> at org.apache.pdfbox.pdmodel.PDResources.getXObject(PDResources.java:385)
> at 
> org.apache.pdfbox.examples.util.PrintImageLocations.processOperator(PrintImageLocations.java:118)
> at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:472)
> at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:446)
> at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:149)
> at 
> org.apache.pdfbox.examples.util.PrintImageLocations.main(PrintImageLocations.java:90)
>
> Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message