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
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 = Close the current document and then open the new document
1 = Open the current document in a new window
Options
Specifies the appearance of the link:
0 = No border
1 = Draw a border
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" - the target page is positioned at the point specified by the Left and Top parameters. The Zoom parameter specifies the zoom percentage.
2 = "Fit" - the entire page is zoomed to fit the window. None of the other parameters are used and should be set to zero.
3 = "FitH" - the page is zoomed so that the entire width of the page is visible. The height of the page may be greater or less than the height of the window. The page is positioned at the vertical position specified by the Top parameter.
4 = "FitV" - the page is zoomed so that the entire height of the page can be seen. The width of the page may be greater or less than the width of the window. The page is positioned at the horizontal position specified by the Left parameter.
5 = "FitR" - the page is zoomed so that a certain rectangle on the page is visible. The Left, Top, Right and Bottom parameters define the rectangular area on the page.
6 = "FitB" - the page is zoomed so that it's bounding box is visible.
7 = "FitBH" - the page is positioned vertically at the position specified by the Top parameter. The page is zoomed so that the entire width of the page's bounding box is visible.
8 = "FitBV" - the page is positioned at the horizontal position specified by the Left parameter. The page is zoomed just enough to fit the entire height of the bounding box into the window.
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,