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

IllegalStateException: Expected 'Page' but found COSName{Annot} in PDPageTree.sanitizeType

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.20
    • Fix Version/s: 2.0.21
    • Component/s: Parsing
    • Labels:

      Description

      Exception in thread "main" java.lang.IllegalStateException: Expected 'Page' but found COSName{Annot}
              at org.apache.pdfbox.pdmodel.PDPageTree.sanitizeType(PDPageTree.java:250)
              at org.apache.pdfbox.pdmodel.PDPageTree.access$300(PDPageTree.java:41)
              at org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.next(PDPageTree.java:210)
              at org.apache.pdfbox.pdmodel.PDPageTree$PageIterator.next(PDPageTree.java:170)
              at org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:320)
              at org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:272)
              at org.apache.pdfbox.tools.ExtractText.extractPages(ExtractText.java:377)
              at org.apache.pdfbox.tools.ExtractText.startExtraction(ExtractText.java:274)
              at org.apache.pdfbox.tools.ExtractText.main(ExtractText.java:97)
              at org.apache.pdfbox.tools.PDFBox.main(PDFBox.java:60) 

      File works in 2.0.20 and in the trunk

        Attachments

        1. 3DDNDTVSP354Z72MXOJKUXVDNN7LFCPY.pdf
          470 kB
          Tilman Hausherr
        2. FYN6FCSAV5PI2WI5I5MSUOU3UJGOYUE4.pdf
          3.06 MB
          Andreas Lehmkühler
        3. M2BEIK4UWALXYEIHCRCJFASR222EEOLV.pdf
          887 kB
          Andreas Lehmkühler

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              tilman Tilman Hausherr
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: