PDPageDestination pageDest = null;
if( rawDest instanceof PDNamedDestination )
{
//if we have a named destination we need to lookup the PDPageDestination
PDNamedDestination namedDest = (PDNamedDestination)rawDest;
PDDocumentNameDictionary namesDict = doc.getDocumentCatalog().getNames();
if( namesDict != null )
{
PDDestinationNameTreeNode destsTree = namesDict.getDests();
if( destsTree != null )
{
pageDest = (PDPageDestination)destsTree.getValue( namedDest.getNamedDestination() );
}
}
}
else if( rawDest instanceof PDPageDestination)
{