org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination
public class: PDNamedDestination [javadoc |
source]
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination
org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDNamedDestination
All Implemented Interfaces:
PDDestinationOrAction
This represents a destination to a page by referencing it with a name.
Methods from org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination: |
---|
create, toString |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDNamedDestination Detail: |
public COSBase getCOSObject() {
return namedDestination;
}
Convert this standard java object to a COS object. |
public String getNamedDestination() {
String retval = null;
if( namedDestination instanceof COSString )
{
retval = ((COSString)namedDestination).getString();
}
else if( namedDestination instanceof COSName )
{
retval = ((COSName)namedDestination).getName();
}
return retval;
}
This will get the name of the destination. |
public void setNamedDestination(String dest) throws IOException {
if( namedDestination instanceof COSString )
{
COSString string = ((COSString)namedDestination);
string.reset();
string.append( dest.getBytes() );
}
else if( dest == null )
{
namedDestination = null;
}
else
{
namedDestination = new COSString( dest );
}
}
Set the named destination. |