SetOutlineOpenFile

大綱

描述

設定大綱項目(書籤)被點選時開啟檔案

語法

Delphi

Function TPDFlib.SetOutlineOpenFile(OutlineID: Integer; Const FileName: WideString): Integer;

ActiveX

Function PDFlib::SetOutlineOpenFile(OutlineID As Long, FileName As String) As Long

DLL

int DLSetOutlineOpenFile(int InstanceID, int OutlineID, const wchar_t* FileName);
int DLSetOutlineOpenFileA(int InstanceID, int OutlineID, const char* FileName);

參數

OutlineID由 NewOutline 函式傳回的大綱 ID。也可以用 GetOutlineID 函式取得有效的大綱 ID
FileName點選大綱時要開啟的檔案。路徑就用您平台原本的寫法傳入:程式庫會把它轉成 PDF 檔案規格,將反斜線映射為斜線,並把磁碟機代號變成第一個路徑組成部分,因此 "c:\my documents\hello.pdf" 會以 "/c/my documents/hello.pdf" 寫入文件。相對路徑有效,包括含 ".." 回上層目錄的路徑。

傳回值

0OutlineID 無效
1大綱目的地設定成功