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

java.lang.StringIndexOutOfBoundsException: String index out of range: 2047

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 1.8.2
    • Fix Version/s: None
    • Component/s: Parsing
    • Labels:
      None
    • Environment:
      JDK6

      Description

      Using code samples provided in PDFBOX-1757 using load() and loadNonSeq() gives the following exception(s) for the test file:

      -http://digitalcorpora.org/corp/nps/files/govdocs1/447/447403.pdf
      java.lang.StringIndexOutOfBoundsException: String index out of range: 2047
      at java.lang.AbstractStringBuilder.deleteCharAt(AbstractStringBuilder.java:770)
      at java.lang.StringBuilder.deleteCharAt(StringBuilder.java:263)
      at org.apache.pdfbox.pdfparser.BaseParser.parseCOSHexString(BaseParser.java:1000)
      at org.apache.pdfbox.pdfparser.BaseParser.parseCOSString(BaseParser.java:808)
      -using loadnonseq
      java.lang.StringIndexOutOfBoundsException: String index out of range: 2047
      at java.lang.AbstractStringBuilder.deleteCharAt(AbstractStringBuilder.java:770)
      at java.lang.StringBuilder.deleteCharAt(StringBuilder.java:263)
      at org.apache.pdfbox.pdfparser.BaseParser.parseCOSHexString(BaseParser.java:1000)
      at org.apache.pdfbox.pdfparser.BaseParser.parseCOSString(BaseParser.java:808)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lehmi Andreas Lehmkühler
                Reporter:
                willp-bl William Palmer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: