Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-5732

Problem converting PDF to image (java.awt.color.CMMException: Can not access specified profile)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.30, 3.0.1 PDFBox
    • 2.0.31, 3.0.2 PDFBox, 4.0.0
    • Rendering
    • None

    Description

      Recently I get the following error when converting PDF files to images. The embedded ICC profile is probably broken. PdfBox should ignore the profile in such cases.

       

      The place is in the DCTFilter.decode(DCTFilter.java:123)

      java.awt.color.CMMException: Can not access specified profile.
          at sun.java2d.cmm.lcms.LCMS.getProfileSizeNative(Native Method) ~[?:?]
          at sun.java2d.cmm.lcms.LCMS.getProfileSize(LCMS.java:68) ~[?:?]
          at java.awt.color.ICC_Profile.getData(ICC_Profile.java:1311) ~[?:?]
          at com.sun.imageio.plugins.jpeg.JPEGImageReader.setImageData(JPEGImageReader.java:798) ~[?:?]
          at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(Native Method) ~[?:?]
          at com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(JPEGImageReader.java:731) ~[?:?]
          at com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(JPEGImageReader.java:725) ~[?:?]
          at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1130) ~[?:?]
          at com.sun.imageio.plugins.jpeg.JPEGImageReader.readRaster(JPEGImageReader.java:1541) ~[?:?]
          at org.apache.pdfbox.filter.DCTFilter.decode(DCTFilter.java:123) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.cos.COSInputStream.create(COSInputStream.java:87) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.cos.COSStream.createInputStream(COSStream.java:175) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:243) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createInputStream(PDImageXObject.java:901) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.from8bit(SampledImageReader.java:499) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.pdmodel.graphics.image.SampledImageReader.getRGBImage(SampledImageReader.java:226) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:514) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.getImage(PDImageXObject.java:477) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.rendering.PageDrawer.drawImage(PageDrawer.java:1115) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.contentstream.operator.graphics.DrawObject.process(DrawObject.java:67) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:980) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:555) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:530) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:155) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:288) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:355) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:272) ~[pdfbox-2.0.29.jar:2.0.29]
          at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:258) ~[pdfbox-2.0.29.jar:2.0.29] 

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            tom_1st Lonzak
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: