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
DestType1 = "XYZ" - 目標頁面定位到 Left 與 Top 參數指定的點,Zoom 參數指定縮放百分比。 2 = "Fit" - 縮放整頁以符合視窗。其他參數都不會使用,應設為零。 3 = "FitH" - 縮放頁面讓整個頁寬可見。頁面高度可能高於或低於視窗高度。頁面垂直定位在 Top 參數指定的位置。 4 = "FitV" - 縮放頁面讓整個頁高可見。頁面寬度可能大於或小於視窗寬度。頁面水平定位在 Left 參數指定的位置。 5 = "FitR" - 縮放頁面讓頁面上某個矩形可見。Left、Top、Right 與 Bottom 參數定義頁面上的矩形區域。 6 = "FitB" - 縮放頁面讓其邊界框可見。 7 = "FitBH" - 頁面垂直定位在 Top 參數指定的位置,並縮放讓邊界框的整個頁寬可見。 8 = "FitBV" - 頁面水平定位在 Left 參數指定的位置,並縮放到剛好讓邊界框的整個頁高納入視窗。
LeftDestType = 1、4、5 與 8 使用的水平位置
TopDestType = 1、3、5 與 7 使用的垂直位置 矩形右緣的水平位置。DestType = 5 時使用
Right
Bottom矩形底邊的水平位置。DestType = 5 時使用

傳回值

0DestPage 參數無效 DestID 值
Non-zero