API referenceAnnotations

pdfResolveBookmarkDest

Resolve a bookmark's destination page on demand, for

Exported namespdfResolveBookmarkDest
Calling conventionstdcall
Thread safetyOne PPDF/handle per thread; see V18 §Threading
IntroducedLumasPDF 2.4.2

Purpose — Resolve a bookmark's destination page on demand, for bookmarks whose destination was deferred by a lazy import.

Description — With the lazy-content import flag (if2LazyContent) set, an imported bookmark may carry an unresolved destination — its target page is not computed at import time, and pdfGetBookmark reports DestPage as 0 while it is unresolved. This function looks the bookmark up by its handle, resolves the deferred destination against the import source — named destinations and integer-indexed destinations included — caches the result on the bookmark, and returns the destination page number. A bookmark whose destination is already resolved simply returns its cached page, so repeat calls for the same handle are cheap.

Parameters

ParameterTypeIn/OutDescription
IPDFPPDFinInstance handle with an imported document.
HandleIntegerinBookmark handle as returned by the bookmark enumeration APIs.

Return value — The 1-based destination page number; 0 when the handle is unknown or the bookmark has no page destination.

Declarations

C
LPDF_API SI32 PDF_CALL pdfResolveBookmarkDest(PPDF IPDF, SI32 Handle);
Delphi
function pdfResolveBookmarkDest(const IPDF: PPDF; Handle: Integer): Integer; stdcall; external 'LumasPdf.dll';

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfResolveBookmarkDest(IntPtr IPDF, int Handle);
Area
Annotations
Category

Core

Exported names

pdfResolveBookmarkDest

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.