pdfGetBookmarkEx
Read a bookmark's metadata (title, color, parent, style, open
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);
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.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Handle | Bookmark handle. |
Bmk | Output struct. |
Return value. pdfGetBookmark/Ex: True if Handle resolves. pdfGetBookmarkCount: total bookmark count in the document; 0 if IPDF invalid.
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Getters
pdfGetBookmarkEx
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.