[ 
https://issues.apache.org/jira/browse/PDFBOX-5787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17827792#comment-17827792
 ] 

Tilman Hausherr commented on PDFBOX-5787:
-----------------------------------------

Please add the version you are using here (hopefully 2.0.30 or 3.0.2), and send 
me the file to  tilman at snafu dot de.

> LCMS error 13: Mismatched alpha channels
> ----------------------------------------
>
>                 Key: PDFBOX-5787
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5787
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Niklas
>            Priority: Major
>
> Using Kotlin to load the first page and trying to render it as an 
> `BufferedImage`:
> ```kotlin
> val pdf = Loader.loadPDF(file)
> val preview = PDFRenderer(pdf).renderImage(0, 1.0f)
> ```
> with a PDF, I'm running into:
> ```
> Exception in thread "main" java.awt.color.CMMException: LCMS error 13: 
> Mismatched alpha channels
>     at java.desktop/sun.java2d.cmm.lcms.LCMS.createNativeTransform(Native 
> Method)
>     at java.desktop/sun.java2d.cmm.lcms.LCMS.createTransform(LCMS.java:113)
>     at 
> java.desktop/sun.java2d.cmm.lcms.LCMSTransform.doTransform(LCMSTransform.java:114)
>     at 
> java.desktop/sun.java2d.cmm.lcms.LCMSTransform.colorConvert(LCMSTransform.java:149)
>     at 
> java.desktop/java.awt.image.ColorConvertOp.ICCBIFilter(ColorConvertOp.java:350)
>     at 
> java.desktop/java.awt.image.ColorConvertOp.filter(ColorConvertOp.java:277)
>     at 
> org.apache.pdfbox.pdmodel.graphics.color.PDColorSpace.toRGBImageAWT(PDColorSpace.java:375)
>     at 
> org.apache.pdfbox.pdmodel.graphics.color.PDDeviceCMYK.toRGBImageAWT(PDDeviceCMYK.java:212)
>     at 
> org.apache.pdfbox.pdmodel.graphics.color.PDDeviceCMYK.toRGBImage(PDDeviceCMYK.java:159)
>     at 
> org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.from8bit(SampledImageReader.java:506)
>     at 
> org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:217)
>     at 
> org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:477)
>     at 
> org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:438)
>     at org.apache.pdfbox.rendering.PageDrawer.drawImage(PageDrawer.java:1106)
>     at 
> org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:74)
>     at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:893)
>     at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:531)
>     at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:506)
>     at 
> org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:153)
>     at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:286)
>     at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:330)
>     at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:247)
>     at 
> org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:207)
> ```
> Would it be possible to somehow privately share the PDF? It's slightly 
> sensitive as it is from a customer of mine and I would not want to share it 
> publicly. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to