Foxit PDF SDK
fsdk.Destination类 参考

Public 成员函数

def GetBottom ()
 获取底部位置值。 更多...
 
def GetDestArray ()
 获取目标PDF数组。 更多...
 
def GetLeft ()
 获取左位置值。 更多...
 
def GetPageIndex (document)
 获取目标页面的索引。 更多...
 
def GetRight ()
 获取右侧位置值。 更多...
 
def GetTop ()
 获取顶部位置值。 更多...
 
def GetZoomFactor ()
 获取缩放因子。 更多...
 
def GetZoomMode ()
 获取缩放模式。 更多...
 
def IsEmpty ()
 检查当前对象是否为空。 更多...
 
def IsLeftNull ()
 检查左位置值是否为空对象。 更多...
 
def IsTopNull ()
 检查顶部位置值是否为空对象。 更多...
 

详细描述

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

参见
fsdk.Bookmark
fsdk.GotoAction
fsdk.RemoteGotoAction
fsdk.EmbeddedGotoAction

成员函数说明

◆ GetBottom()

def fsdk.Destination.GetBottom ( )

获取底部位置值。

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

返回
底部位置值。

◆ GetDestArray()

def fsdk.Destination.GetDestArray ( )

获取目标PDF数组。

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

◆ GetLeft()

def fsdk.Destination.GetLeft ( )

获取左位置值。

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

返回
左位置值。

◆ GetPageIndex()

def fsdk.Destination.GetPageIndex (   document)

获取目标页面的索引。

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

◆ GetRight()

def fsdk.Destination.GetRight ( )

获取右侧位置值。

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

返回
右侧位置值。

◆ GetTop()

def fsdk.Destination.GetTop ( )

获取顶部位置值。

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

返回
顶部位置值。

◆ GetZoomFactor()

def fsdk.Destination.GetZoomFactor ( )

获取缩放因子。

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

返回
缩放因子。

◆ GetZoomMode()

def fsdk.Destination.GetZoomMode ( )

获取缩放模式。

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

◆ IsEmpty()

def fsdk.Destination.IsEmpty ( )

检查当前对象是否为空。

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

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

◆ IsLeftNull()

def fsdk.Destination.IsLeftNull ( )

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

此方法仅在缩放模式为fsdk.DestinationE_ZoomXYZ fsdk.DestinationE_ZoomFitVert fsdk.DestinationE_ZoomFitBVert 时有用。 此函数可用于检查左位置值是否为空对象。 对于其他缩放模式,此函数将返回false

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

◆ IsTopNull()

def fsdk.Destination.IsTopNull ( )

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

此方法仅在缩放模式为fsdk.DestinationE_ZoomXYZ fsdk.DestinationE_ZoomFitHorz fsdk.DestinationE_ZoomFitBHorz 时有用。 此函数可用于检查顶部位置值是否为空对象。 对于其他缩放模式,此函数将返回false

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