API referenceAnnotations

pdfGetBookmark

Read a bookmark's metadata (title, color, parent, style, open

C
BOOL32 __stdcall pdfGetBookmark(PPDF IPDF, int32_t Handle, TBookmark* Bmk);
BOOL32 __stdcall pdfGetBookmarkEx(void* IPDF, uint32_t Handle, TPDFBookmark* Bmk);
int32_t __stdcall pdfGetBookmarkCount(PPDF IPDF);
Delphi
function pdfGetBookmark(const IPDF: PPDF; Handle: Integer; var Bmk: TBookmark): LongBool; stdcall;
function pdfGetBookmarkEx(const IPDF: Pointer; Handle: Cardinal; var Bmk: TPDFBookmark): LongBool; stdcall;
function pdfGetBookmarkCount(const IPDF: PPDF): Integer; stdcall;

Purpose. Read a bookmark's metadata (title, color, parent, style, open state, destination) by handle, in one of two struct shapes.

Description. Both pdfGetBookmark and pdfGetBookmarkEx always report Bmk.DestType as dtXY_Zoom unconditionally — this is consistent with pdfSetBookmarkDest's own dropped-parameters finding below: since this SDK never actually stores a distinct destination-array kind or its numeric parameters, there is nothing else for the getter to report. pdfGetBookmark's Bmk.Title is always returned as Unicode (Bmk.Unicode := True unconditionally) regardless of how the bookmark's title was originally set (A or W insertion) — the underlying storage is Wide-string-based throughout.

Parameters.

ParameterDescription
IPDFDocument handle.
HandleBookmark handle.
BmkOutput struct.

Return value. pdfGetBookmark/Ex: True if Handle resolves. pdfGetBookmarkCount: total bookmark count in the document; 0 if IPDF invalid.

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Annotations
Category

Getters

Exported names

pdfGetBookmark

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.