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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.0.5
    • Fix Version/s: 2.0.6, 3.0.0 PDFBox
    • Component/s: Rendering, Text extraction
    • Labels:
      None
    • Environment:
      Ubuntu + Windows, JRE 1.8.0 121

      Description

      The attached PDF document produces an exception in rendering or text extraction.

      Stacktrace:

      java.lang.ClassCastException: org.apache.pdfbox.cos.COSDictionary cannot be cast to org.apache.pdfbox.cos.COSStream
      at org.apache.pdfbox.pdmodel.PDPage.getContents(PDPage.java:157)
      at org.apache.pdfbox.pdfparser.PDFStreamParser.<init>(PDFStreamParser.java:92)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:485)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:469)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
      at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:206)
      at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:145)
      at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:68)
      at biz.pinnau.rcp.pdf.java.PDFBoxHandler.renderCurrentImage(PDFBoxHandler.java:52)
      at biz.pinnau.rcp.pdf.SWTPDFPositionChooser$12.run(SWTPDFPositionChooser.java:403)

        Attachments

        1. test.pdf
          6 kB
          Peter Pinnau

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              pinnau Peter Pinnau
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: