Foxit PDF SDK
com.foxit.sdk.pdf.actions.Destination类 参考
类 com.foxit.sdk.pdf.actions.Destination 继承关系图:
com.foxit.sdk.common.Base

Public 成员函数

 Destination (PDFArray dest_array)
 构造函数,使用指定的PDF数组对象。 更多...
 
 Destination (Destination other)
 构造函数,使用另一个目标对象。 更多...
 
synchronized void delete ()
 直接清除C++相关资源。 更多...
 
float getBottom () throws com.foxit.sdk.PDFException
 获取底部位置值。 更多...
 
PDFArray getDestArray () throws com.foxit.sdk.PDFException
 获取目标PDF数组。 更多...
 
float getLeft () throws com.foxit.sdk.PDFException
 获取左位置值。 更多...
 
int getPageIndex (PDFDoc document) throws com.foxit.sdk.PDFException
 获取目标页面的索引。 更多...
 
float getRight () throws com.foxit.sdk.PDFException
 获取右侧位置值。 更多...
 
float getTop () throws com.foxit.sdk.PDFException
 获取顶部位置值。 更多...
 
float getZoomFactor () throws com.foxit.sdk.PDFException
 获取缩放因子。 更多...
 
int getZoomMode () throws com.foxit.sdk.PDFException
 获取缩放模式。 更多...
 
boolean isEmpty ()
 检查当前对象是否为空。 更多...
 
boolean isLeftNull () throws com.foxit.sdk.PDFException
 检查左位置值是否为空对象。 更多...
 
boolean isTopNull () throws com.foxit.sdk.PDFException
 检查顶部位置值是否为空对象。 更多...
 
- Public 成员函数 继承自 com.foxit.sdk.common.Base
synchronized void delete ()
 直接清除C++相关资源。 更多...
 

静态 Public 成员函数

static Destination createFitBBox (PDFDoc document, int page_index) throws com.foxit.sdk.PDFException
 为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBBox 创建目标对象。 更多...
 
static Destination createFitBHorz (PDFDoc document, int page_index, float top) throws com.foxit.sdk.PDFException
 为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBHorz 创建目标对象。 更多...
 
static Destination createFitBVert (PDFDoc document, int page_index, float left) throws com.foxit.sdk.PDFException
 为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBVert 创建目标对象。 更多...
 
static Destination createFitHorz (PDFDoc document, int page_index, float top) throws com.foxit.sdk.PDFException
 为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitHorz 创建目标对象。 更多...
 
static Destination createFitPage (PDFDoc document, int page_index) throws com.foxit.sdk.PDFException
 为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitPage 创建目标对象。 更多...
 
static Destination createFitRect (PDFDoc document, int page_index, float left, float bottom, float right, float top) throws com.foxit.sdk.PDFException
 为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitRect 创建目标对象。 更多...
 
static Destination createFitVert (PDFDoc document, int page_index, float left) throws com.foxit.sdk.PDFException
 为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitVert 创建目标对象。 更多...
 
static Destination createFromPDFArray (PDFDoc document, PDFArray pdf_array) throws com.foxit.sdk.PDFException
 从现有的目标数组创建目标对象。 更多...
 
static Destination createXYZ (PDFDoc document, int page_index, float left, float top, float zoom_factor) throws com.foxit.sdk.PDFException
 为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ 创建目标对象。 更多...
 

静态 Public 属性

static final int e_ZoomFitBBox = 6
 在显示页面时使页面的边界框完全适合显示区域。 更多...
 
static final int e_ZoomFitBHorz = 7
 在显示页面时使页面边界框的整个宽度适合显示区域。 更多...
 
static final int e_ZoomFitBVert = 8
 在显示页面时使页面边界框的整个高度适合显示区域。 更多...
 
static final int e_ZoomFitHorz = 3
 在显示页面时使页面的整个宽度适合显示区域。 更多...
 
static final int e_ZoomFitPage = 2
 在显示页面时使整个页面适合显示区域。 更多...
 
static final int e_ZoomFitRect = 5
 在显示页面时使指定矩形中的页面内容完全适合显示区域。 更多...
 
static final int e_ZoomFitVert = 4
 在显示页面时使页面的整个高度适合显示区域。 更多...
 
static final int e_ZoomXYZ = 1
 以指定位置和指定缩放因子显示页面。 更多...
 

详细描述

目标定义了PDF文档的特定视图,包含以下项目:

  • 要显示的文档页面。

  • 文档窗口在该页面上的位置。

  • 显示页面时使用的放大(缩放)因子。

Destinations may be associated with bookmarks, or some types of actions. In each case, the destination specifies the view of the document to be presented when the bookmark item or link annotation is opened or 执行动作时。
此类提供了为不同缩放模式创建目标对象以及获取目标数据的函数。

参见
com.foxit.sdk.pdf.Bookmark
com.foxit.sdk.pdf.actions.GotoAction
com.foxit.sdk.pdf.actions.RemoteGotoAction
com.foxit.sdk.pdf.actions.EmbeddedGotoAction

构造及析构函数说明

◆ Destination() [1/2]

com.foxit.sdk.pdf.actions.Destination.Destination ( PDFArray  dest_array)

构造函数,使用指定的PDF数组对象。

参数
[in]dest_array表示目标数据的PDF数组对象。

◆ Destination() [2/2]

com.foxit.sdk.pdf.actions.Destination.Destination ( Destination  other)

构造函数,使用另一个目标对象。

参数
[in]other另一个目标对象。

成员函数说明

◆ createFitBBox()

static Destination com.foxit.sdk.pdf.actions.Destination.createFitBBox ( PDFDoc  document,
int  page_index 
) throws com.foxit.sdk.PDFException
static

为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBBox 创建目标对象。

参数
[in]document有效的PDF文档对象。
[in]page_indexPDF文档中目标页面的索引。
返回
新的目标对象。

◆ createFitBHorz()

static Destination com.foxit.sdk.pdf.actions.Destination.createFitBHorz ( PDFDoc  document,
int  page_index,
float  top 
) throws com.foxit.sdk.PDFException
static

为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBHorz 创建目标对象。

参数
[in]document有效的PDF文档对象。
[in]page_indexPDF文档中目标页面的索引。
[in]top顶边的垂直坐标。
返回
新的目标对象。

◆ createFitBVert()

static Destination com.foxit.sdk.pdf.actions.Destination.createFitBVert ( PDFDoc  document,
int  page_index,
float  left 
) throws com.foxit.sdk.PDFException
static

为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBVert 创建目标对象。

参数
[in]document有效的PDF文档对象。
[in]page_indexPDF文档中目标页面的索引。
[in]left左边缘的水平坐标。
返回
新的目标对象。

◆ createFitHorz()

static Destination com.foxit.sdk.pdf.actions.Destination.createFitHorz ( PDFDoc  document,
int  page_index,
float  top 
) throws com.foxit.sdk.PDFException
static

为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitHorz 创建目标对象。

参数
[in]document有效的PDF文档对象。
[in]page_indexPDF文档中目标页面的索引。
[in]top顶边的垂直坐标。
返回
新的目标对象。

◆ createFitPage()

static Destination com.foxit.sdk.pdf.actions.Destination.createFitPage ( PDFDoc  document,
int  page_index 
) throws com.foxit.sdk.PDFException
static

为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitPage 创建目标对象。

参数
[in]document有效的PDF文档对象。
[in]page_indexPDF文档中目标页面的索引。
返回
新的目标对象。

◆ createFitRect()

static Destination com.foxit.sdk.pdf.actions.Destination.createFitRect ( PDFDoc  document,
int  page_index,
float  left,
float  bottom,
float  right,
float  top 
) throws com.foxit.sdk.PDFException
static

为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitRect 创建目标对象。

参数
[in]document有效的PDF文档对象。
[in]page_indexPDF文档中目标页面的索引。
[in]left矩形的左坐标。
[in]bottom矩形的底坐标。
[in]right矩形的右坐标。
[in]top矩形的顶坐标。
返回
新的目标对象。

◆ createFitVert()

static Destination com.foxit.sdk.pdf.actions.Destination.createFitVert ( PDFDoc  document,
int  page_index,
float  left 
) throws com.foxit.sdk.PDFException
static

为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomFitVert 创建目标对象。

参数
[in]document有效的PDF文档对象。
[in]page_indexPDF文档中目标页面的索引。
[in]left左边缘的水平坐标。
返回
新的目标对象。

◆ createFromPDFArray()

static Destination com.foxit.sdk.pdf.actions.Destination.createFromPDFArray ( PDFDoc  document,
PDFArray  pdf_array 
) throws com.foxit.sdk.PDFException
static

从现有的目标数组创建目标对象。

参数
[in]document有效的PDF文档对象。
[in]pdf_array目标PDF数组。此PDF数组可以从类型为com.foxit.sdk.pdf.objects.PDFNameTree.e_Dests com.foxit.sdk.pdf.objects.PDFNameTree 中检索。
返回
新的目标对象。

◆ createXYZ()

static Destination com.foxit.sdk.pdf.actions.Destination.createXYZ ( PDFDoc  document,
int  page_index,
float  left,
float  top,
float  zoom_factor 
) throws com.foxit.sdk.PDFException
static

为缩放模式com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ 创建目标对象。

参数
[in]document有效的PDF文档对象。
[in]page_indexPDF文档中目标页面的索引。
[in]left作为页面左上角位置的水平坐标值。
[in]top作为页面左上角位置的垂直坐标值。
[in]zoom_factor缩放因子值。
返回
新的目标对象。

◆ delete()

synchronized void com.foxit.sdk.pdf.actions.Destination.delete ( )

直接清除C++相关资源。

返回
无。
注解
一旦这个接口被调用,这个对象将不能再被使用。

◆ getBottom()

float com.foxit.sdk.pdf.actions.Destination.getBottom ( ) throws com.foxit.sdk.PDFException

获取底部位置值。

此方法仅在缩放模式为com.foxit.sdk.pdf.actions.Destination.e_ZoomFitRect 时有用。 对于其他缩放模式,此函数将返回0.0f。

返回
底部位置值。

◆ getDestArray()

PDFArray com.foxit.sdk.pdf.actions.Destination.getDestArray ( ) throws com.foxit.sdk.PDFException

获取目标PDF数组。

返回
目标PDF数组。如果发生任何错误,此函数将返回null

◆ getLeft()

float com.foxit.sdk.pdf.actions.Destination.getLeft ( ) throws com.foxit.sdk.PDFException

获取左位置值。

这仅在缩放模式为com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ com.foxit.sdk.pdf.actions.Destination.e_ZoomFitVert com.foxit.sdk.pdf.actions.Destination.e_ZoomFitRect com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBVert 时有用。 特别是对于com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ com.foxit.sdk.pdf.actions.Destination.e_ZoomFitVert com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBVert ,左值可能是一个空对象, 这意味着只需使用应用程序的当前左值作为目标的左值。 在这种情况下,此函数将返回0.0f。为了检查左值是否为0或 空对象,建议用户调用函数Destination.isLeftNull
对于其他缩放模式,此函数将返回0.0f。

返回
左位置值。

◆ getPageIndex()

int com.foxit.sdk.pdf.actions.Destination.getPageIndex ( PDFDoc  document) throws com.foxit.sdk.PDFException

获取目标页面的索引。

参数
[in]document有效的PDF文档对象。
返回
页面索引,从0开始。如果有任何错误,此函数将返回-1。

◆ getRight()

float com.foxit.sdk.pdf.actions.Destination.getRight ( ) throws com.foxit.sdk.PDFException

获取右侧位置值。

此方法仅在缩放模式为com.foxit.sdk.pdf.actions.Destination.e_ZoomFitRect 时有用。 对于其他缩放模式,此函数将返回0.0f。

返回
右侧位置值。

◆ getTop()

float com.foxit.sdk.pdf.actions.Destination.getTop ( ) throws com.foxit.sdk.PDFException

获取顶部位置值。

此方法仅在缩放模式为com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ com.foxit.sdk.pdf.actions.Destination.e_ZoomFitHorz com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBHorz com.foxit.sdk.pdf.actions.Destination.e_ZoomFitRect 时有用。 特别地,对于com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ com.foxit.sdk.pdf.actions.Destination.e_ZoomFitHorz com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBHorz ,顶部位置值可能是空对象,这意味着只使用 应用程序的当前顶部位置值作为目标的顶部位置值。在这种情况下, 此函数将返回0.0f。为了检查左位置值是否为0或空对象, 建议用户调用函数Destination.isTopNull
对于其他缩放模式,此函数将返回0.0f。

返回
顶部位置值。

◆ getZoomFactor()

float com.foxit.sdk.pdf.actions.Destination.getZoomFactor ( ) throws com.foxit.sdk.PDFException

获取缩放因子。

此方法仅在缩放模式为com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ 时有用。 对于com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ ,如果缩放因子为0, 这意味着只使用应用程序的当前缩放因子作为目标缩放因子。
对于其他缩放模式,此函数将返回0.0f。

返回
缩放因子。

◆ getZoomMode()

int com.foxit.sdk.pdf.actions.Destination.getZoomMode ( ) throws com.foxit.sdk.PDFException

获取缩放模式。

返回
缩放模式值。请参考从com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ 开始的值, 这将是这些值中的一个。如果没有缩放模式或缩放模式未知,此函数将返回0。

◆ isEmpty()

boolean com.foxit.sdk.pdf.actions.Destination.isEmpty ( )

检查当前对象是否为空。

当当前对象为空时,意味着当前对象无用。

返回
true表示当前对象为空,false表示不为空。

◆ isLeftNull()

boolean com.foxit.sdk.pdf.actions.Destination.isLeftNull ( ) throws com.foxit.sdk.PDFException

检查左位置值是否为空对象。

此方法仅在缩放模式为com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ com.foxit.sdk.pdf.actions.Destination.e_ZoomFitVert com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBVert 时有用。 此函数可用于检查左位置值是否为空对象。 对于其他缩放模式,此函数将返回false

返回
true表示左位置值是空对象,false表示左位置值不是空对象, 可以通过函数Destination.getLeft 获取左位置值。

◆ isTopNull()

boolean com.foxit.sdk.pdf.actions.Destination.isTopNull ( ) throws com.foxit.sdk.PDFException

检查顶部位置值是否为空对象。

此方法仅在缩放模式为com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ com.foxit.sdk.pdf.actions.Destination.e_ZoomFitHorz com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBHorz 时有用。 此函数可用于检查顶部位置值是否为空对象。 对于其他缩放模式,此函数将返回false

返回
true表示顶部位置值是空对象,false表示顶部位置值不是空对象, 可以通过函数Destination.getTop 获取顶部位置值。

类成员变量说明

◆ e_ZoomFitBBox

final int com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBBox = 6
static

在显示页面时使页面的边界框完全适合显示区域。

如果使用此选项,意味着页面内容应恰好放大到足以使其边界框在水平和垂直方向 都完全适合显示区域。如果所需的水平和垂直放大因子不同,使用较小的那个, 并在另一个维度中将边界框居中显示在显示区域中。

◆ e_ZoomFitBHorz

final int com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBHorz = 7
static

在显示页面时使页面边界框的整个宽度适合显示区域。

如果使用此选项,意味着页面内容应恰好放大到足以使页面边界框的整个宽度 适合显示区域。

◆ e_ZoomFitBVert

final int com.foxit.sdk.pdf.actions.Destination.e_ZoomFitBVert = 8
static

在显示页面时使页面边界框的整个高度适合显示区域。

如果使用此选项,意味着页面内容应恰好放大到足以使页面边界框的整个高度 适合显示区域。

◆ e_ZoomFitHorz

final int com.foxit.sdk.pdf.actions.Destination.e_ZoomFitHorz = 3
static

在显示页面时使页面的整个宽度适合显示区域。

如果使用此选项,意味着页面内容应恰好放大到足以使页面的整个宽度 适合显示区域。

◆ e_ZoomFitPage

final int com.foxit.sdk.pdf.actions.Destination.e_ZoomFitPage = 2
static

在显示页面时使整个页面适合显示区域。

如果使用此选项,意味着页面内容应恰好放大到足以使整个页面在水平和垂直方向 都适合显示区域。如果所需的水平和垂直放大因子不同,使用较小的那个, 并在另一个维度中将页面居中显示在窗口中。

◆ e_ZoomFitRect

final int com.foxit.sdk.pdf.actions.Destination.e_ZoomFitRect = 5
static

在显示页面时使指定矩形中的页面内容完全适合显示区域。

如果使用此选项,意味着页面内容应恰好放大到足以使指定矩形中的页面内容 在水平和垂直方向都完全适合显示区域。如果所需的水平和垂直放大因子不同, 使用较小的那个,并在另一个维度中将矩形居中显示在显示区域中。

◆ e_ZoomFitVert

final int com.foxit.sdk.pdf.actions.Destination.e_ZoomFitVert = 4
static

在显示页面时使页面的整个高度适合显示区域。

如果使用此选项,意味着页面内容应恰好放大到足以使页面的整个高度 适合显示区域。

◆ e_ZoomXYZ

final int com.foxit.sdk.pdf.actions.Destination.e_ZoomXYZ = 1
static

以指定位置和指定缩放因子显示页面。

如果使用此选项,意味着页面的指定位置将在页面渲染时被视为左上角位置, 此位置应位于显示区域的左上角。页面内容应按指定的缩放因子放大。