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

Can't ExtractImages an IndexedCMYK raster

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • None
    • None
    • PDModel
    • None

    Description

      [imported from SourceForge]
      http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1589598
      Originally submitted by rpresser on 2006-11-02 14:50.

      I have a lot of these images; they're part of my
      everyday workflow. CMYK images are extremely common in
      the prepress world; IndexedCMYK is too, because it is
      the default setting for Adobe Distiller when the total
      number of unique colors is less than 256.

      C:\temp\PDFBox-0.7.3\bin>ExtractImages.exe 797-14-1.pdf
      Writing image:Im1-2
      Exception in thread "main"
      java.lang.UnsupportedOperationException
      at
      java.awt.image.ColorModel.createCompatibleSampleModel(ColorModel.java:684)
      at
      java.awt.image.ColorModel.createCompatibleWritableRaster(ColorModel.java:677)
      at
      org.pdfbox.pdmodel.graphics.xobject.PDPixelMap.getRGBImage(PDPixelMap.java:143)
      at
      org.pdfbox.pdmodel.graphics.xobject.PDPixelMap.write2OutputStream(PDPixelMap.java:166)
      at
      org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage.write2file(PDXObjectImage.java:118)
      at
      org.pdfbox.ExtractImages.extractImages(ExtractImages.java:161)
      at
      org.pdfbox.ExtractImages.main(ExtractImages.java:72)


      It turns out that my sample image 797-14-1.pdf was too
      large to upload to sourceforge. I created a reduced
      resolution version of it, and got a different exception
      when attempting to ExtractImages on it:

      C:\temp>extractimages test.pdf
      Writing image:R29-1
      Exception in thread "main" java.io.IOException: Not
      implemented
      at
      org.pdfbox.pdmodel.graphics.color.PDDeviceCMYK.createColorModel(PDDeviceCMYK.java:135)
      at
      org.pdfbox.pdmodel.graphics.xobject.PDPixelMap.getRGBImage(PDPixelMap.java:142)
      at
      org.pdfbox.pdmodel.graphics.xobject.PDPixelMap.write2OutputStream(PDPixelMap.java:166)
      at
      org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage.write2file(PDXObjectImage.java:118)
      at
      org.pdfbox.ExtractImages.extractImages(ExtractImages.java:161)
      at
      org.pdfbox.ExtractImages.main(ExtractImages.java:72)

      [attachment on SourceForge]
      http://sourceforge.net/tracker/download.php?group_id=78314&atid=552832&aid=1589598&file_id=201210
      test.pdf (application/pdf), 99717 bytes
      example PDF

      [comment on SourceForge]
      Originally sent by benlitchfield.
      Logged In: YES
      user_id=601708
      Originator: NO

      Note: see 797-14-1.pdf

      [comment on SourceForge]
      Originally sent by benlitchfield.
      Logged In: YES
      user_id=601708
      Originator: NO

      Note: requested original pdf file from rpresser

      [comment on SourceForge]
      Originally sent by rpresser.
      Logged In: YES
      user_id=298615

      Email me at rpresser AT gmail DOT com to get the original
      PDF, if desired.

      Attachments

        Issue Links

          Activity

            People

              lehmi Andreas Lehmkühler
              Anonymous Anonymous
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: