org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure

## Class PDObjectReference

- java.lang.Object
- - org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDObjectReference

All Implemented Interfaces:
  COSObjectable

    public class PDObjectReference
    extends Object
    implements COSObjectable

An object reference.

This is described as "Entries in an object reference dictionary" in the PDF specification.

Author:
  Johannes Koch

### Field Summary

Fields
`static String` `TYPE` TYPE of this object.

### Constructor Summary

Constructors
Constructor and Description
`PDObjectReference()` Default Constructor.
`PDObjectReference(COSDictionary theDictionary)` Constructor for an existing object reference.

### Method Summary

All Methods Instance Methods Concrete Methods
`COSDictionary` `getCOSObject()` Returns the underlying dictionary.
`PDPage` `getPage()` Get the page on which the object shall be rendered.
`COSObjectable` `getReferencedObject()` Gets a higher-level object for the referenced object.
`void` `setPage(PDPage page)` Sets the page on which the object shall be rendered.
`void` `setReferencedObject(PDAnnotation annotation)` Sets the referenced annotation.
`void` `setReferencedObject(PDXObject xobject)` Sets the referenced XObject.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### TYPE

    public static final String TYPE

TYPE of this object.

See Also:
  Constant Field Values

### Constructor Detail

#### PDObjectReference

    public PDObjectReference()

Default Constructor.

#### PDObjectReference

    public PDObjectReference(COSDictionary theDictionary)

Constructor for an existing object reference.

Parameters:
  `theDictionary` - The existing dictionary.

### Method Detail

#### getCOSObject

    public COSDictionary getCOSObject()

Returns the underlying dictionary.

Specified by:
  `getCOSObject` in interface `COSObjectable`
Returns:
  the dictionary

#### getReferencedObject

    public COSObjectable getReferencedObject()

Gets a higher-level object for the referenced object. Currently this method may return a `PDAnnotation`, a `PDXObject` or `null`.

Returns:
  a higher-level object for the referenced object

#### setReferencedObject

    public void setReferencedObject(PDAnnotation annotation)

Sets the referenced annotation.

Parameters:
  `annotation` - the referenced annotation

#### setReferencedObject

    public void setReferencedObject(PDXObject xobject)

Sets the referenced XObject.

Parameters:
  `xobject` - the referenced XObject

#### getPage

    public PDPage getPage()

Get the page on which the object shall be rendered.

Returns:
  the referenced page or null.

#### setPage

    public void setPage(PDPage page)

Sets the page on which the object shall be rendered. This is optional and overrides the /PG entry in the structure element containing the object reference; shall be used if the structure element contained no such entry.

Parameters:
  `page` -