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

ClassCastException in readVersionInTrailer

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.7, 1.8.8, 2.0.0
    • Fix Version/s: 1.8.8, 2.0.0
    • Component/s: Parsing
    • Labels:
      None

      Description

      I get this exception with the attached file:

      Exception in thread "main" java.lang.ClassCastException: org.apache.pdfbox.cos.COSFloat cannot be cast to org.apache.pdfbox.cos.COSName
              at org.apache.pdfbox.pdfparser.PDFParser.readVersionInTrailer(PDFParser.java:918)
      

      The cause is this:

      << 
      /Type /Catalog 
      /PageLabels 68 0 R 
      /Version 1.39999 
      

      A version must be like this:

      /Version /1.4
      

      I'll fix this by ignoring the wrong version and put out a warning.

        Attachments

          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: