AddLinkToFileEx
注释和热点链接
描述
向选定页面添加可单击热点矩形,链接到另一 PDF 文档中的特定页面和位置。使用 SetAnnotBorderColor 函数可更改热点边框颜色
与目标文档的链接仅通过文件名建立。这意味着目标文档的页面尺寸未知,因此 DestLeft、DestTop、DestRight 和 DestBottom 参数始终指定为从目标页面's MediaBox 左下角测量的点
语法
Delphi
Function TPDFlib.AddLinkToFileEx(Left, Top, Width, Height: Double; Const FileName: WideString; DestPage: Integer; NewWindow, Options, Zoom, DestType: Integer; DestLeft, DestTop, DestRight, DestBottom: Double): Integer;
ActiveX
Function PDFlib::AddLinkToFileEx(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 DLAddLinkToFileEx(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);
参数
Left
热点矩形左边缘的水平坐标
Top
热点矩形上边缘的垂直坐标
Width
热点矩形的宽度
Height
热点矩形的高度
FileName
要链接的 PDF 文档路径和文件名
DestPage
目标文档中要链接到的页面
NewWindow
0 = 关闭当前文档,然后打开新文档
1 = 在新窗口中打开当前文档
Options
指定链接的外观:
0 = 无边框
1 = 绘制边框
目标对象使用的缩放百分比,有效值为 0 至 6400,仅用于 DestType = 1,其他 DestType 应设为 0
Zoom
DestType
1 = "XYZ" - 目标页面定位在 Left 和 Top 参数指定的点,Zoom 参数指定缩放百分比
2 = "适合" - 整个页面会缩放以适合窗口。不会使用其他任何参数,应将其设为零
3 = "FitH" - 页面会缩放至完整宽度可见,页面高度可能大于或小于窗口高度,页面将定位在 Top 参数指定的垂直位置
4 = "FitV" - 页面会缩放至可看到整个页面高度。页面宽度可能大于或小于窗口宽度。页面会定位在 Left 参数指定的水平位置
5 = "FitR" - 页面缩放以使页面上的特定矩形可见。Left、Top、Right 和 Bottom 参数定义页面上的矩形区域
6 = "FitB" - 缩放页面,使其'边界框可见
7 = "FitBH" - 页面会在 Top 参数指定的位置垂直定位。页面会缩放,使页面'边界框的整个宽度可见
8 = "FitBV" - 页面定位到 Left 参数指定的水平位置。页面仅缩放至足以使边界框的整个高度适合窗口
DestLeft
DestType = 1、4、5 和 8 使用的水平位置
DestTop
DestType = 1、3、5 和 7 使用的垂直位置
DestRight
矩形右边缘的水平位置,供 DestType = 5 使用
DestBottom
矩形底部的水平位置,用于 DestType = 5
double DestLeft, double DestTop, double DestRight, double DestBottom)
Height: Double; FileName: WideString; DestPage, NewWindow, Options, Zoom, DestType: Integer; DestLeft, DestTop, DestRight,