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

ObjStm is being processed to late

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.8.6, 2.0.0
    • None
    • None

    Description

      I have a pdf that has the following

      1 0 obj^M
      <</Type/Catalog/Pages 5 0 R/Metadata 8 0 R/AcroForm<</Fields[]>>>>^M

      and

      22 0 obj^M
      <</Type /ObjStm /N 2/First 10/Length 175/Filter /FlateDecode>>stream^M

      Inside the 22 0 obj is the 5 0 which holds the pages. When 1 0obj is parsed then a place holder is set for the 5 0Obj with it's value set to null. When 22 0 is parsed it is not expanded so 5 0 is always null.

      When I go to get all the pages

      document.getDocumentCatalog().getAllPages() it returns 0 since

      (COSDictionary)root.getDictionaryObject( COSName.PAGES ) is null.

      Should ObjStm not get processed immediately so the objects tha are in there are filled?

      I have a pdf as an example but it is confidential so I can send it someone off list

      Attachments

        Activity

          People

            tilman Tilman Hausherr
            dave.smith Dave Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: