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

ClassCastException: org.apache.pdfbox.cos.COSStream cannot be cast to org.apache.pdfbox.cos.COSNumber

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.21
    • Fix Version/s: 2.0.22, 3.0.0 PDFBox
    • Component/s: Rendering
    • Labels:
      None
    • Environment:
      Windows 10

      Description

      java.lang.ClassCastException: org.apache.pdfbox.cos.COSStream cannot be cast to org.apache.pdfbox.cos.COSNumber
      at org.apache.pdfbox.pdmodel.font.PDCIDFont.readWidths(PDCIDFont.java:90)
      at org.apache.pdfbox.pdmodel.font.PDCIDFont.<init>(PDCIDFont.java:66)
      at org.apache.pdfbox.pdmodel.font.PDCIDFontType2.<init>(PDCIDFontType2.java:78)
      at org.apache.pdfbox.pdmodel.font.PDCIDFontType2.<init>(PDCIDFontType2.java:65)
      at org.apache.pdfbox.pdmodel.font.PDFontFactory.createDescendantFont(PDFontFactory.java:139)
      at org.apache.pdfbox.pdmodel.font.PDType0Font.<init>(PDType0Font.java:196)
      at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:97)
      at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:146)
      at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:66)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:933)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:515)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:489)
      at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:156)
      at org.apache.pdfbox.rendering.PageDrawer.drawPage(PageDrawer.java:272)
      at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:321)
      at org.apache.pdfbox.rendering.PDFRenderer.renderImage(PDFRenderer.java:243)
      at org.apache.pdfbox.rendering.PDFRenderer.renderImageWithDPI(PDFRenderer.java:229)

        Attachments

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              wim.maerevoet Wim Maerevoet
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: