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

Error expected floating point number actual='0.-262'

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.12, 1.8.13, 2.0.3, 3.0.0 PDFBox
    • Fix Version/s: 1.8.13, 2.0.4, 3.0.0 PDFBox
    • Component/s: Parsing
    • Labels:
      None

      Description

      As reported by Simon Gaeremynck in the user mailing list with attached file.

      [3] Stack trace:
      [error] at org.apache.pdfbox.cos.COSFloat.<init>(COSFloat.java:81)
      [error] at org.apache.pdfbox.cos.COSNumber.get(COSNumber.java:115)
      [error] at org.apache.pdfbox.pdfparser.BaseParser.parseDirObject(BaseParser.java:939)
      

      His proposed change in COSFloat

      -            if (aFloat.matches("^0\\.0+\\-\\d+"))
      +            if (aFloat.matches("^0\\.0*\\-\\d+"))
      

      I'll commit it after running regression tests.

        Attachments

        1. PDFBOX-3500.pdf
          257 kB
          Tilman Hausherr

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: