AddRelativeLinkToFileEx

Annotations and hotspot links

Description

Adds a clickable hotspot rectangle to the selected page which links using relative path to a specific page and position in another PDF document. Use the SetAnnotBorderColor function to change the color of the hotspot border.

The link to the target document is only via the file name. This means the page dimensions of the target document are not known so the DestLeft, DestTop, DestRight and DestBottom parameters are always specified in points measured from the bottom left corner of the destination page's MediaBox.

Syntax

Delphi

Function TPDFlib.AddRelativeLinkToFileEx(Left, Top, Width, Height: Double; Const FileName: WideString; DestPage: Integer; NewWindow, Options, Zoom, DestType: Integer; DestLeft, DestTop, DestRight, DestBottom: Double): Integer;

ActiveX

Function PDFlib::AddRelativeLinkToFileEx(Left As Double, Top As Double, Width As Double, Height As Double, FileName As String, DestPage As Long, NewWindow As Long, Options As Long, Zoom As Long, DestType As Long, DestLeft As Double, DestTop As Double, DestRight As Double, DestBottom As Double) As Long

DLL

int DLAddRelativeLinkToFileEx(int InstanceID, double Left, double Top, double Width, double Height, const wchar_t * FileName, int DestPage, int NewWindow, int Options, int Zoom, int DestType, double DestLeft, double DestTop, double DestRight, double DestBottom);

Parameters

Left

The horizontal co-ordinate of the left edge of the hotspot rectangle

Top

The vertical co-ordinate of the top edge of the hotspot rectangle

Width

The width of the hotspot rectangle

Height

The height of the hotspot rectangle

FileName

The full absolute path and file name of the PDF document to link to, it will be converted to relative path.

DestPage

The page in the destination document to link to

NewWindow

0 = Fechar o documento atual e depois abrir o novo documento

1 = Abrir o documento atual numa nova janela

Options

Specifies the appearance of the link:

0 = Sem margem

1 = Desenhar uma margem

The zoom percentage to use for the destination object, valid values from 0 to 6400. Only used for DestType = 1, should be set to 0 for other DestTypes.

Zoom

DestType

1 = "XYZ" - a página de destino é posicionada no ponto especificado pelos parâmetros Left e Top. O parâmetro Zoom especifica a percentagem de zoom

2 = "Fit" - a página inteira é ampliada para caber na janela. Nenhum dos outros parâmetros é utilizado e devem ser definidos como zero

3 = "FitH" - a página é ampliada de modo que toda a largura da página seja visível. A altura da página pode ser maior ou menor que a altura da janela. A página é posicionada na posição vertical especificada pelo parâmetro Top

4 = "FitV" - a página é ampliada de modo que toda a altura da página possa ser vista. A largura da página pode ser maior ou menor que a largura da janela. A página é posicionada na posição horizontal especificada pelo parâmetro Left

5 = "FitR" - a página é ampliada de modo que um determinado retângulo na página seja visível. Os parâmetros Left, Top, Right e Bottom definem a área retangular na página

6 = "FitB" - a página é ampliada de modo que a sua caixa delimitadora seja visível

7 = "FitBH" - a página é posicionada verticalmente na posição especificada pelo parâmetro Top. A página é ampliada de modo que toda a largura da caixa delimitadora da página seja visível

8 = "FitBV" - a página é posicionada na posição horizontal especificada pelo parâmetro Left. A página é ampliada apenas o suficiente para caber toda a altura da caixa delimitadora na janela

DestLeft

The horizontal position used by DestType = 1, 4, 5 and 8

DestTop

The vertical position used by DestType = 1, 3, 5 and 7

DestRight

The horizontal position of the righthand edge of the rectangle. Used by DestType = 5

DestBottom

The horizontal position of the bottom of the rectangle. Used by DestType = 5

int NewWindow, int Options, int Zoom, int DestType, double DestLeft, double DestTop, double DestRight, double DestBottom);

Height: Double; FileName: WideString; DestPage, NewWindow, Options, Zoom, DestType: Integer; DestLeft, DestTop, DestRight,