FindLoadedBookmarkPageIndex 會在 loaded document outline tree 中搜尋 bookmark title,並傳回 destination page index。搜尋不分大小寫,會先走訪 child bookmarks 再走訪 sibling bookmarks,並傳回 zero-based page index

Syntax

function FindLoadedBookmarkPageIndex(const Title: AnsiString): Integer;

說明

FindLoadedBookmarkPageIndex 會在 loaded document outline tree 中搜尋 bookmark title,並傳回 destination page index。搜尋不區分大小寫,會先走訪 child bookmarks 再走訪 sibling bookmarks,並傳回 zero-based page indexFindLoadedBookmarkPageIndex

The method resolves explicit destination arrays stored in /Dest 與儲存在 /A /D 中的本地 GoTo 動作。回傳 -1 時表示找不到

Example

PDF.LoadFromFile('Manual.pdf');
PageIndex := PDF.FindLoadedBookmarkPageIndex('Installation');
if PageIndex >= 0 then
  Writeln('Bookmark is on page ', PageIndex + 1);

請參閱