You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2023/02/03 04:14:00 UTC

[jira] [Resolved] (PDFBOX-5563) Can't open PDF with PDFBox: java.awt.color.CMMException: LCMS error 13: Couldn't link the profiles

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

Tilman Hausherr resolved PDFBOX-5563.
-------------------------------------
    Fix Version/s: 2.0.28
                   3.0.0 PDFBox
         Assignee: Tilman Hausherr
       Resolution: Fixed

[~vmerkel] thanks for reporting it. A snapshot is available here
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.28-SNAPSHOT/

> Can't open PDF with PDFBox: java.awt.color.CMMException: LCMS error 13: Couldn't link the profiles
> --------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-5563
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5563
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 2.0.24, 2.0.27, 3.0.0 PDFBox
>         Environment: Java: Amazon corretto windows x64 jdk
> OS: Windows 10
>            Reporter: Viktor Merkel
>            Assignee: Tilman Hausherr
>            Priority: Major
>             Fix For: 2.0.28, 3.0.0 PDFBox
>
>         Attachments: problem-1.pdf
>
>
> If I try to open the attached PDF document face the following error message and the document will not be displayed:
>  
> {noformat}
> java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.awt.color.CMMException: LCMS error 13: Couldn't link the profiles
>     org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.done(PagePane.java:481)
>     java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
>     java.base/java.security.AccessController.doPrivileged(Native Method)
>     java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
> Caused by: java.util.concurrent.ExecutionException: java.awt.color.CMMException: LCMS error 13: Couldn't link the profiles
>     org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.done(PagePane.java:461)
>     java.desktop/sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112)
>     java.base/java.security.AccessController.doPrivileged(Native Method)
>     java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
> Caused by: java.awt.color.CMMException: LCMS error 13: Couldn't link the profiles
>     java.desktop/sun.java2d.cmm.lcms.LCMS.createNativeTransform(Native Method)
>     java.desktop/sun.java2d.cmm.lcms.LCMS.createTransform(LCMS.java:156)
>     java.desktop/sun.java2d.cmm.lcms.LCMSTransform.doTransform(LCMSTransform.java:150)
>     java.desktop/sun.java2d.cmm.lcms.LCMSTransform.colorConvert(LCMSTransform.java:624)
>     org.apache.pdfbox.pdmodel.graphics.color.PDICCBased.toRGB(PDICCBased.java:351)
>     org.apache.pdfbox.rendering.PageDrawer.getPaint(PageDrawer.java:350)
>     org.apache.pdfbox.rendering.PageDrawer.getNonStrokingPaint(PageDrawer.java:746)
>     org.apache.pdfbox.rendering.PageDrawer.fillPath(PageDrawer.java:878)
>     org.apache.pdfbox.contentstream.operator.graphics.FillNonZeroRule.process(FillNonZeroRule.java:37)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:933)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:514)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:492)
>     org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:155)
>     org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:277)
>     org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:347)
>     org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:449)
>     org.apache.pdfbox.debugger.pagepane.PagePane$RenderWorker.doInBackground(PagePane.java:1)
>     java.base/java.lang.Thread.run(Thread.java:829)
> {noformat}
> The same document can be successfully opened with Adobe's Acrobat Reader.
> If I add a try catch statement in the affected toRGB function of org.apache.pdfbox.pdmodel.graphics.color.PDICCBased and return the value from the input I'm able to display display the document but the upper and lower bar is yellow instead blue (like in Acrobat Reader).
> {code:java}
> @Override
>     public float[] toRGB(float[] value) throws IOException
>     {
>         if (isRGB)
>         {
>             return value;
>         }
>         if (awtColorSpace != null)
>         {
>             // PDFBOX-2142: clamp bad values
>             // WARNING: toRGB is very slow when used with LUT-based ICC profiles
>             try {
>                 return awtColorSpace.toRGB(clampColors(awtColorSpace, value));
>             } catch (Exception ex) {
>                 return value;
>             }
>         }
>         else
>         {
>             return alternateColorSpace.toRGB(value);
>         }
>     } {code}
> Unfortunately I'm not familiar with color profiles and color spaces.
> Any suggest how to overcome this problem?
> Thanks in advance.



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

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