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

PDObjectReference getReferencedObject() returns null if referenced obj is not a COSStream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.9, 2.0.2, 2.0.3, 3.0.0 PDFBox
    • 2.0.9, 3.0.0 PDFBox
    • PDModel

    Description

      When creating a pdf I am setting a PDAnnotation as the referenced object of a PDObjectReference using setReferencedObject.

      When I subsequently load the same document and then call getReferencedObject on the PDObjectReference, null is returned. This is because an exception is thrown in PDXObject.createXObject (called inside getReferencedObject) as the referenced object is not a COSStream, just a COSDictionary.

      Attachments

        1. 000671.pdf
          848 kB
          Tilman Hausherr

        Activity

          People

            tilman Tilman Hausherr
            mark.melling@savageminds.com Mark Melling
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: