This class represents an appearance for an annotation.
Method from org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream Detail: |
public PDRectangle getBoundingBox() {
PDRectangle box = null;
COSArray bbox = (COSArray)stream.getDictionaryObject( COSName.getPDFName( "BBox" ) );
if( bbox != null )
{
box = new PDRectangle( bbox );
}
return box;
}
Get the bounding box for this appearance. This may return null in which
case the Rectangle from the annotation should be used. |
public COSBase getCOSObject() {
return stream;
}
|
public PDResources getResources() {
PDResources retval = null;
COSDictionary dict = (COSDictionary)stream.getDictionaryObject( COSName.RESOURCES );
if( dict != null )
{
retval = new PDResources( dict );
}
return retval;
}
This will get the resources for this appearance stream. |
public COSStream getStream() {
return stream;
}
This will return the underlying stream. |
public void setBoundingBox(PDRectangle rectangle) {
COSArray array = null;
if( rectangle != null )
{
array = rectangle.getCOSArray();
}
stream.setItem( COSName.getPDFName( "BBox" ), array );
}
This will set the bounding box for this appearance stream. |
public void setResources(PDResources resources) {
COSDictionary dict = null;
if( resources != null )
{
dict = resources.getCOSDictionary();
}
stream.setItem( COSName.RESOURCES, dict );
}
This will set the new resources. |