Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure

public Class PDObjectReference

extends Object
implements COSObjectable
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.pdmodel.common.COSObjectable
Imports
java.io.IOException, org.apache.commons.logging.Log, .LogFactory, org.apache.pdfbox.cos.COSDictionary, .COSName, .COSStream, org.apache.pdfbox.pdmodel.PDPage, org.apache.pdfbox.pdmodel.common.COSObjectable, org.apache.pdfbox.pdmodel.graphics.PDXObject, org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation, .PDAnnotationUnknown

An object reference.

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

Author
Johannes Koch

Field Summary

Modifier and TypeField and Description
private final COSDictionary
private static final Log
LOG

Log instance.

public static final String
TYPE

TYPE of this object.

Constructor Summary

AccessConstructor and Description
public
PDObjectReference()

Default Constructor.

public
PDObjectReference(COSDictionary
The existing dictionary.
theDictionary
)

Constructor for an existing object reference.

Method Summary

Modifier and TypeMethod and Description
public COSDictionary

Returns:

the dictionary
getCOSObject
()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Returns the underlying dictionary.

public PDPage

Returns:

the referenced page or null.
getPage
()

Get the page on which the object shall be rendered.

public COSObjectable

Returns:

a higher-level object for the referenced object
getReferencedObject
()

Gets a higher-level object for the referenced object.

public void
setPage(PDPage page)

Sets the page on which the object shall be rendered.

public void
setReferencedObject(PDAnnotation
the referenced annotation
annotation
)

Sets the referenced annotation.

public void
setReferencedObject(PDXObject
the referenced XObject
xobject
)

Sets the referenced XObject.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dictionaryback to summary
private final COSDictionary dictionary
LOGback to summary
private static final Log LOG

Log instance.

TYPEback to summary
public static final String TYPE

TYPE of this object.

Constructor Detail

PDObjectReferenceback to summary
public PDObjectReference()

Default Constructor.

PDObjectReferenceback to summary
public PDObjectReference(COSDictionary theDictionary)

Constructor for an existing object reference.

Parameters
theDictionary:COSDictionary

The existing dictionary.

Method Detail

getCOSObjectback to summary
public COSDictionary getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Returns the underlying dictionary.

Returns:COSDictionary

the dictionary

Annotations
@Override
getPageback to summary
public PDPage getPage()

Get the page on which the object shall be rendered.

Returns:PDPage

the referenced page or null.

getReferencedObjectback to summary
public COSObjectable getReferencedObject()

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

Returns:COSObjectable

a higher-level object for the referenced object

setPageback to summary
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.

setReferencedObjectback to summary
public void setReferencedObject(PDAnnotation annotation)

Sets the referenced annotation.

Parameters
annotation:PDAnnotation

the referenced annotation

setReferencedObjectback to summary
public void setReferencedObject(PDXObject xobject)

Sets the referenced XObject.

Parameters
xobject:PDXObject

the referenced XObject