Class PDObjectReference

  • All Implemented Interfaces:
    COSObjectable

    public class PDObjectReference
    extends java.lang.Object
    implements COSObjectable
    An object reference.

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

    Author:
    Johannes Koch
    • Field Detail

    • 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

      • 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 -