org.pdfbox.pdmodel.graphics.xobject
Class PDXObject
java.lang.Object
org.pdfbox.pdmodel.graphics.xobject.PDXObject
- COSObjectable
public abstract class PDXObject
extends java.lang.Object
The base class for all XObjects in the PDF document.
PDXObject
public PDXObject(COSStream xobj)
Standard constuctor.
xobj
- The XObject dictionary.
PDXObject
public PDXObject(PDDocument doc)
Standard constuctor.
doc
- The doc to store the object contents.
PDXObject
public PDXObject(PDStream xobj)
Standard constuctor.
xobj
- The XObject dictionary.
createXObject
public static PDXObject createXObject(COSBase xobject)
throws IOException
Create the correct xobject from the cos base.
xobject
- The cos level xobject to create.
getCOSStream
public COSStream getCOSStream()
Returns the stream.
- The stream for this object.
getMetadata
public PDMetadata getMetadata()
Get the metadata that is part of the document catalog. This will
return null if there is no meta data for this object.
- The metadata for this object.
getPDStream
public PDStream getPDStream()
Returns the stream.
- The stream for this object.
setMetadata
public void setMetadata(PDMetadata meta)
Set the metadata for this object. This can be null.
meta
- The meta data for this object.