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

Newly created XRef stream has direct root objects

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.10, 1.8.11, 2.0.0
    • Fix Version/s: 1.8.11, 2.0.0
    • Component/s: Writing
    • Labels:
      None

      Description

      To investigate PDFBOX-3026 I wanted to create a small file with an XRef stream by calling doc.getDocument().setIsXRefStream(true);, but got a /Root entry with direct contents, instead of "/Root 1 0 R". This has never occured before, because when saving loaded files, the COSObject in-between is kept.

      18 0 obj
      <<
      /Root <<
      /Type /Catalog
      /Version /1.5
      /Pages 2 0 R
      /Metadata 3 0 R
      /OutputIntents [4 0 R]
      >>
      /ID [<848925E7B926C5E7504AD6AC3DFD77AA> <848925E7B926C5E7504AD6AC3DFD77AA>]
      /Type /XRef
      /Size 19
      /Index [1 17]
      /W [1 2 0]
      /Length 51
      >>
      stream
      

      I'll make an appropriate change in PDFXRefStream to change this.

        Attachments

          Issue Links

            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: