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

NumberFormatException in CFFParser.readRealNumber()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.15, 2.0.11
    • Fix Version/s: 1.8.17, 2.0.13, 3.0.0 PDFBox
    • Component/s: FontBox
    • Labels:

      Description

      Exception in thread "main" java.lang.NumberFormatException: For input string: "-1.5258789E-E-55"
              at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043)
              at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
              at java.lang.Double.parseDouble(Double.java:538)
              at java.lang.Double.valueOf(Double.java:502)
              at org.apache.fontbox.cff.CFFParser.readRealNumber(CFFParser.java:405)
              at org.apache.fontbox.cff.CFFParser.readEntry(CFFParser.java:281)
              at org.apache.fontbox.cff.CFFParser.readDictData(CFFParser.java:258)
              at org.apache.fontbox.cff.CFFParser.parseType1Dicts(CFFParser.java:736)
              at org.apache.fontbox.cff.CFFParser.parseFont(CFFParser.java:569)
              at org.apache.fontbox.cff.CFFParser.parse(CFFParser.java:125)
              at org.apache.fontbox.cff.CFFParser.parse(CFFParser.java:76)
      

      This happens on pages 2 and 3. The cause is an invalid sequence that has "E-" twice. We just skip one of the E's and it works.

        Attachments

        1. pop-bugzilla37292.pdf
          110 kB
          Tilman Hausherr

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              tilman Tilman Hausherr
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: