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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.12, 1.8.13, 2.0.3, 3.0.0 PDFBox
    • 1.8.13, 2.0.4, 3.0.0 PDFBox
    • Parsing
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: