NewDestination
注释和热点链接、文档管理
描述
创建一个新目标对象,可与 AddLinkToDestination、GetDestPage、GetDestType 或 GetDestValue 函数配合使用
语法
Delphi
Function TPDFlib.NewDestination(DestPage, Zoom, DestType: Integer; Left, Top, Right, Bottom: Double): Integer;
ActiveX
Function PDFlib::NewDestination(DestPage As Long, Zoom As Long, DestType As Long, Left As Double, Top As Double, Right As Double, Bottom As Double) As Long
DLL
int DLNewDestination(int InstanceID, int DestPage, int Zoom, int DestType, double Left, double Top, double Right, double Bottom);
参数
| DestPage | 此目标对象链接到的页码 |
|---|---|
| Zoom | 目标对象使用的缩放百分比,有效值为 0 到 6400。仅在 DestType = 1 时使用,其他 DestType 应设为 0 |
| DestType | 1 = "XYZ" - 目标页面定位于 Left 和 Top 参数指定的点。Zoom 参数指定缩放百分比。2 = "Fit" - 整个页面缩放以适合窗口。不使用其他参数,且应设为零。3 = "FitH" - 页面缩放以使整个页面宽度可见。页面高度可能大于或小于窗口高度。页面定位于 Top 参数指定的垂直位置。4 = "FitV" - 页面缩放以使整个页面高度可见。页面宽度可能大于或小于窗口宽度。页面定位于 Left 参数指定的水平位置。5 = "FitR" - 页面缩放以使页面上的特定矩形可见。Left、Top、Right 和 Bottom 参数定义页面上的矩形区域。6 = "FitB" - 页面缩放以使其's边界框可见。7 = "FitBH" - 页面按 Top 参数指定的位置垂直定位。页面缩放以使页面's边界框的整个宽度可见。8 = "FitBV" - 页面定位于 Left 参数指定的水平位置。页面缩放至恰好能使边界框整个高度适合窗口 |
| Left | DestType = 1、4、5 和 8 使用的水平位置 |
| Top | DestType = 1、3、5 和 7 使用的垂直位置 矩形右侧边缘的水平位置。由 DestType = 5 使用 |
| Right | |
| Bottom | 矩形底部的水平位置,用于 DestType = 5 |
返回值
| 0 | DestPage 参数无效 一个 DestID 值 |
|---|---|
| Non-zero |