To rephrase your question: you want to get all the named destinations from a PDF document, but instead of the page references, you want to get the page numbers.
However, you are using reader.GetNamedDestinationFromStrings()
which returns page references.
Instead, you should use:
Dictionary<string,string> map = SimpleNamedDestination.GetNamedDestination(reader, false);
which gives you destinations in the form of a ´string´ (the values of the Dictionary
).
Such a string
looks like this: 3 XYZ 36 802 0
where the first element (3
) is the page number.