How to read Named Destination?

Question:

We are trying to parse Actions and Destinations, but it is unclear how to parse Named actions.

Answer:

Action.GetDest() is only valid for GoTo Actions.

For Named there are 4 possible values from the N key.

Action action = // ... if(action.GetType() == Action.Type.e_Named) { SDF.Obj n = action.GetSDFObj().FindObj("N"); if(n != null && n.IsName()) { switch(n.GetName()) { case "NextPage" : /* */ break; case "PrevPage" : /* */ break; case "FirstPage" : /* */ break; case "LastPage" : /* */ break; } } }