NamedDestinations
Overview
NamedDestinations is a class in Aspose.Pdf FOSS for Java.
Provides access to named destinations in a PDF document (ISO 32000-1:2008, §12.3.2.3).
Properties
| Name | Type | Access | Description |
|---|---|---|---|
names | List<String> | Read | Returns all named destination names from both sources, deduplicated and |
| in insertion order ({@code /Names → /Dests} entries first, then any | |||
| extra keys from the legacy {@code /Dests} dictionary). | |||
count | int | Read | Returns the total number of named destinations. |
namesArray | String[] | Read | Returns all named destination names as an array. |
Methods
| Signature | Description |
|---|---|
NamedDestinations(catalog: COSDictionary, doc: Document, parser: PDFParser) | Creates a NamedDestinations accessor. |
get(name: String) → ExplicitDestination | Resolves a named destination to an explicit destination. |
getNames() → List<String> | Returns all named destination names from both sources, deduplicated and |
| in insertion order ({@code /Names → /Dests} entries first, then any | |
| extra keys from the legacy {@code /Dests} dictionary). | |
getCount() → int | Returns the total number of named destinations. |
size() → int | Alias for {@link #getCount()} matching the C# Aspose {@code .Count} property. |
getNamesArray() → String[] | Returns all named destination names as an array. |
add(name: String, destination: ExplicitDestination) | Adds (or replaces) a named destination via the catalog’s |
| {@code /Names→/Dests} name tree (PDF 1.2+). | |
set(name: String, destination: ExplicitDestination) | Sets a named destination — semantically identical to |
| {@link #add(String, ExplicitDestination)}; the name tree’s | |
| {@code put} replaces any existing value. | |
remove(name: String) → boolean | Removes a named destination if it exists. |