AddRelativeLinkToLocalFileA

Annotations and hotspot links

Description

The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to AddRelativeLinkToLocalFile and string arguments are interpreted using the current SetAnsiMode code page

Adds a clickable hotspot rectangle to the selected page which links using relative path to a local file.

The file doesn't have to exist when the PDF is created but should exist when the PDF is viewed for the link to work.

Use the SetAnnotBorderColor function to change the colour of the hotspot border.

Syntax

Delphi

Function DLAddRelativeLinkToLocalFileA(InstanceID: Integer; Left, Top, Width, Height: Double; FileName: PAnsiChar; Options: Integer): Integer;

DLL

int DLAddRelativeLinkToLocalFileA(int InstanceID, double Left, double Top, double Width, double Height, const char * FileName, int Options);

Parameters

LeftThe horizontal co-ordinate of the left edge of the hotspot rectangle
TopThe vertical co-ordinate of the top edge of the hotspot rectangle
WidthThe width of the hotspot rectangle
HeightThe height of the hotspot rectangle The full absolute path and file name of the PDF document to link to, it will be converted to relative path.
FileNameSpecifies the appearance of the link: 0 = No border 1 = Draw a border
Options