NamedDestinations

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

NameTypeAccessDescription
namesList<String>ReadReturns 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).
countintReadReturns the total number of named destinations.
namesArrayString[]ReadReturns all named destination names as an array.

Methods

SignatureDescription
NamedDestinations(catalog: COSDictionary, doc: Document, parser: PDFParser)Creates a NamedDestinations accessor.
get(name: String)ExplicitDestinationResolves 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()intReturns the total number of named destinations.
size()intAlias 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)booleanRemoves a named destination if it exists.

See Also