java.lang.ClassCastException: org.apache.pdfbox.cos.COSDictionary cannot be cast to org.apache.pdfbox.cos.COSStream

pdfbox-dev | Lars Torunski (JIRA) | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    [jira] Updated: (PDFBOX-880) ClassCastException: COSDictionary cannot be cast to COSStream

    pdfbox-dev | 6 years ago | Lars Torunski (JIRA)
    java.lang.ClassCastException: org.apache.pdfbox.cos.COSDictionary cannot be cast to org.apache.pdfbox.cos.COSStream

    Root Cause Analysis

    1. java.lang.ClassCastException

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

      at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont()
    2. Apache PDFBox
      PDFTextStripper.writeText
      1. org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:115)
      2. org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:76)
      3. org.apache.pdfbox.pdmodel.PDResources.getFonts(PDResources.java:115)
      4. org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:243)
      5. org.apache.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:225)
      6. org.apache.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:441)
      7. org.apache.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:365)
      8. org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:321)
      8 frames