Foxit PDF SDK
FSDestination类 参考
类 FSDestination 继承关系图:
FSBase

构造函数

(float) - getBottom
 获取底部位置值。
更多...
 
(FSPDFArray *) - getDestArray
 获取目标PDF数组。
更多...
 
(float) - getLeft
 获取左位置值。
更多...
 
(int) - getPageIndex:
 获取目标页面的索引。
更多...
 
(float) - getRight
 获取右侧位置值。
更多...
 
(float) - getTop
 获取顶部位置值。
更多...
 
(float) - getZoomFactor
 获取缩放因子。
更多...
 
(FSDestinationZoomMode) - getZoomMode
 获取缩放模式。
更多...
 
(id) - initWithDest_array:
 构造函数,使用指定的PDF数组对象。
更多...
 
(id) - initWithOther:
 构造函数,使用另一个目标对象。
更多...
 
(BOOL) - isEmpty
 检查当前对象是否为空。
更多...
 
(BOOL) - isLeftNull
 检查左位置值是否为空对象。
更多...
 
(BOOL) - isTopNull
 检查顶部位置值是否为空对象。
更多...
 

类方法

(FSDestination *) + createFitBBox:page_index:
 为缩放模式 FSDestinationZoomFitBBox 创建目标对象。
更多...
 
(FSDestination *) + createFitBHorz:page_index:top:
 为缩放模式 FSDestinationZoomFitBHorz 创建目标对象。
更多...
 
(FSDestination *) + createFitBVert:page_index:left:
 为缩放模式 FSDestinationZoomFitBVert 创建目标对象。
更多...
 
(FSDestination *) + createFitHorz:page_index:top:
 为缩放模式 FSDestinationZoomFitHorz 创建目标对象。
更多...
 
(FSDestination *) + createFitPage:page_index:
 为缩放模式 FSDestinationZoomFitPage 创建目标对象。
更多...
 
(FSDestination *) + createFitRect:page_index:left:bottom:right:top:
 为缩放模式 FSDestinationZoomFitRect 创建目标对象。
更多...
 
(FSDestination *) + createFitVert:page_index:left:
 为缩放模式 FSDestinationZoomFitVert 创建目标对象。
更多...
 
(FSDestination *) + createFromPDFArray:pdf_array:
 从现有的目标数组创建目标对象。
更多...
 
(FSDestination *) + createXYZ:page_index:left:top:zoom_factor:
 为缩放模式 FSDestinationZoomXYZ 创建目标对象。
更多...
 

详细描述

目标定义了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 执行动作时。
此类提供了为不同缩放模式创建目标对象以及获取目标数据的函数。

参见
FSBookmark
FSGotoAction
FSRemoteGotoAction
FSEmbeddedGotoAction

函数文档

◆ createFitBBox:page_index:()

+ (FSDestination *) createFitBBox: (FSPDFDoc*)  document
page_index: (int)  page_index 

为缩放模式 FSDestinationZoomFitBBox 创建目标对象。

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

◆ createFitBHorz:page_index:top:()

+ (FSDestination *) createFitBHorz: (FSPDFDoc*)  document
page_index: (int)  page_index
top: (float)  top 

为缩放模式 FSDestinationZoomFitBHorz 创建目标对象。

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

◆ createFitBVert:page_index:left:()

+ (FSDestination *) createFitBVert: (FSPDFDoc*)  document
page_index: (int)  page_index
left: (float)  left 

为缩放模式 FSDestinationZoomFitBVert 创建目标对象。

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

◆ createFitHorz:page_index:top:()

+ (FSDestination *) createFitHorz: (FSPDFDoc*)  document
page_index: (int)  page_index
top: (float)  top 

为缩放模式 FSDestinationZoomFitHorz 创建目标对象。

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

◆ createFitPage:page_index:()

+ (FSDestination *) createFitPage: (FSPDFDoc*)  document
page_index: (int)  page_index 

为缩放模式 FSDestinationZoomFitPage 创建目标对象。

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

◆ createFitRect:page_index:left:bottom:right:top:()

+ (FSDestination *) createFitRect: (FSPDFDoc*)  document
page_index: (int)  page_index
left: (float)  left
bottom: (float)  bottom
right: (float)  right
top: (float)  top 

为缩放模式 FSDestinationZoomFitRect 创建目标对象。

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

◆ createFitVert:page_index:left:()

+ (FSDestination *) createFitVert: (FSPDFDoc*)  document
page_index: (int)  page_index
left: (float)  left 

为缩放模式 FSDestinationZoomFitVert 创建目标对象。

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

◆ createFromPDFArray:pdf_array:()

+ (FSDestination *) createFromPDFArray: (FSPDFDoc*)  document
pdf_array: (FSPDFArray*)  pdf_array 

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

参数
[in]document有效的PDF文档对象。
[in]pdf_array目标PDF数组。此PDF数组可以从类型为 FSPDFNameTreeDests 的 FSPDFNameTree 中检索。
返回
新的目标对象。

◆ createXYZ:page_index:left:top:zoom_factor:()

+ (FSDestination *) createXYZ: (FSPDFDoc*)  document
page_index: (int)  page_index
left: (float)  left
top: (float)  top
zoom_factor: (float)  zoom_factor 

为缩放模式 FSDestinationZoomXYZ 创建目标对象。

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

◆ getBottom()

- (float) getBottom

获取底部位置值。

此方法仅在缩放模式为 FSDestinationZoomFitRect 时有用。 对于其他缩放模式,此函数将返回0.0f。

返回
底部位置值。

◆ getDestArray()

- (FSPDFArray *) getDestArray

获取目标PDF数组。

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

◆ getLeft()

- (float) getLeft

获取左位置值。

这仅在缩放模式为 FSDestinationZoomXYZ 、 FSDestinationZoomFitVert 、 FSDestinationZoomFitRect 或 FSDestinationZoomFitBVert 时有用。 特别是对于 FSDestinationZoomXYZ 、 FSDestinationZoomFitVert 和 FSDestinationZoomFitBVert ,左值可能是一个空对象, 这意味着只需使用应用程序的当前左值作为目标的左值。 在这种情况下,此函数将返回0.0f。为了检查左值是否为0或 空对象,建议用户调用函数 FSDestination::isLeftNull 。
对于其他缩放模式,此函数将返回0.0f。

返回
左位置值。

◆ getPageIndex:()

- (int) getPageIndex: (FSPDFDoc*)  document

获取目标页面的索引。

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

◆ getRight()

- (float) getRight

获取右侧位置值。

此方法仅在缩放模式为 FSDestinationZoomFitRect 时有用。 对于其他缩放模式,此函数将返回0.0f。

返回
右侧位置值。

◆ getTop()

- (float) getTop

获取顶部位置值。

此方法仅在缩放模式为 FSDestinationZoomXYZ 、 FSDestinationZoomFitHorz 、 FSDestinationZoomFitBHorz 或 FSDestinationZoomFitRect 时有用。 特别地,对于 FSDestinationZoomXYZ 、 FSDestinationZoomFitHorz 和 FSDestinationZoomFitBHorz ,顶部位置值可能是空对象,这意味着只使用 应用程序的当前顶部位置值作为目标的顶部位置值。在这种情况下, 此函数将返回0.0f。为了检查左位置值是否为0或空对象, 建议用户调用函数 FSDestination::isTopNull 。
对于其他缩放模式,此函数将返回0.0f。

返回
顶部位置值。

◆ getZoomFactor()

- (float) getZoomFactor

获取缩放因子。

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

返回
缩放因子。

◆ getZoomMode()

- (FSDestinationZoomMode) getZoomMode

获取缩放模式。

返回
缩放模式值。请参考从 FSDestinationZoomXYZ 开始的值, 这将是这些值中的一个。如果没有缩放模式或缩放模式未知,此函数将返回0。

◆ initWithDest_array:()

- (id) initWithDest_array: (FSPDFArray*)  dest_array

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

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

◆ initWithOther:()

- (id) initWithOther: (FSDestination*)  other

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

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

◆ isEmpty()

- (BOOL) isEmpty

检查当前对象是否为空。

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

返回
YES表示当前对象为空,NO表示不为空。

◆ isLeftNull()

- (BOOL) isLeftNull

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

此方法仅在缩放模式为 FSDestinationZoomXYZ 、 FSDestinationZoomFitVert 或 FSDestinationZoomFitBVert 时有用。 此函数可用于检查左位置值是否为空对象。 对于其他缩放模式,此函数将返回NO。

返回
YES表示左位置值是空对象,NO表示左位置值不是空对象, 可以通过函数 FSDestination::getLeft 获取左位置值。

◆ isTopNull()

- (BOOL) isTopNull

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

此方法仅在缩放模式为 FSDestinationZoomXYZ 、 FSDestinationZoomFitHorz 或 FSDestinationZoomFitBHorz 时有用。 此函数可用于检查顶部位置值是否为空对象。 对于其他缩放模式,此函数将返回NO。

返回
YES表示顶部位置值是空对象,NO表示顶部位置值不是空对象, 可以通过函数 FSDestination::getTop 获取顶部位置值。