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

org.apache.pdfbox.cos.COSArray cannot be cast to org.apache.pdfbox.cos.COSDictionary

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.8, 1.8.9, 2.0.0
    • Fix Version/s: 1.8.9, 2.0.0
    • Component/s: None
    • Labels:
    • Environment:
      levigo-jbig2-imageio-1.6.1.jar, jai_codec.jar, jai_imageio.jar

      Description

      When I start .convertToImage() this error is occur:

      org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap getRGBImage
      SEVERE: java.lang.ClassCastException: org.apache.pdfbox.cos.COSArray cannot be cast to org.apache.pdfbox.cos.COSDictionary
      java.lang.ClassCastException: org.apache.pdfbox.cos.COSArray cannot be cast to org.apache.pdfbox.cos.COSDictionary
      at org.apache.pdfbox.filter.JBIG2Filter.decode(JBIG2Filter.java:73)
      at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:351)
      at org.apache.pdfbox.cos.COSStream.doDecode(COSStream.java:299)
      at org.apache.pdfbox.cos.COSStream.getUnfilteredStream(COSStream.java:225)
      at org.apache.pdfbox.pdmodel.common.PDStream.createInputStream(PDStream.java:232)
      at org.apache.pdfbox.pdmodel.common.PDStream.getByteArray(PDStream.java:510)
      at org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap.getRGBImage(PDPixelMap.java:254)
      at org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage.mask(PDXObjectImage.java:221)
      at org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectImage.applyMasks(PDXObjectImage.java:154)
      at org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap.getRGBImage(PDPixelMap.java:365)
      at org.apache.pdfbox.util.operator.pagedrawer.Invoke.process(Invoke.java:87)
      at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:557)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:268)
      at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:235)
      at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:215)
      at org.apache.pdfbox.pdfviewer.PageDrawer.drawPage(PageDrawer.java:139)
      at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:801)
      at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:732)
      at com.sign.PDFCutter.PDFCut(PDFCutter.java:75)
      at com.sign.CopyFileTree.visitFile(CopyFileTree.java:103)
      at com.sign.CopyFileTree.visitFile(CopyFileTree.java:21)
      at java.nio.file.Files.walkFileTree(Files.java:2667)
      at java.nio.file.Files.walkFileTree(Files.java:2739)
      at com.sign.Copy.main(Copy.java:158)

      and some resulting images are blank, some images in grey shades with fading text

        Attachments

        1. PDFBOX-2726.pdf
          87 kB
          Tilman Hausherr
        2. Book_1.Working_project_1.jpg
          71 kB
          Dmitry Andreev
        3. Book_1.Working_project.pdf
          8.94 MB
          Dmitry Andreev

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              DAndreev Dmitry Andreev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: