SetOutlineOpenFile

Outlines

Description

Sets the outline item (bookmark) to open a file when it is clicked.

Syntax

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);

Parameters

OutlineIDThe ID of the outline as returned by the NewOutline function. Alternatively, use the GetOutlineID function to get a valid outline ID.
FileNameThe file to open when the outline is clicked. Pass the path in the form your platform uses: the library converts it to a PDF file specification, mapping back slashes to forward slashes and turning a drive identifier into the first path component, so "c:\my documents\hello.pdf" is written to the document as "/c/my documents/hello.pdf". Relative path names are valid, including paths that include the ".." operator to move up a directory.

Return values

0The OutlineID was invalid
1The outline destination was set successfully