Foxit PDF SDK
FSDK::Action类 参考
类 FSDK::Action 继承关系图:
FSDK::EmbeddedGotoAction FSDK::GotoAction FSDK::HideAction FSDK::ImportDataAction FSDK::JavaScriptAction FSDK::LaunchAction FSDK::NamedAction FSDK::RemoteGotoAction FSDK::RenditionAction FSDK::ResetFormAction FSDK::SubmitFormAction FSDK::URIAction

Public 成员函数

 constructor (document, action_dict)
 带参数的构造函数。 更多...
 
 GetDict ()
 获取当前对象的 PDF 字典。 更多...
 
 GetDocument ()
 获取当前操作所属的 PDF 文档。 更多...
 
 GetSubAction (index)
 通过索引获取子操作。 更多...
 
 GetSubActionCount ()
 获取子操作的数量。 更多...
 
 GetType ()
 获取操作类型。 更多...
 
 InsertSubAction (index, sub_action)
 将新子操作插入到索引指定的位置。 更多...
 
 IsEmpty ()
 检查当前对象是否为空。 更多...
 
 RemoveAllSubActions ()
 删除所有子操作。 更多...
 
 RemoveSubAction (index)
 删除由索引指定的子操作。 更多...
 
 SetSubAction (index, sub_action)
 通过索引设置子操作。 更多...
 

静态 Public 成员函数

static Create (document, action_type)
 为指定的操作类型创建新操作。 更多...
 

静态 Public 属性

static e_NewWindowFlagFalse
 新窗口标志的枚举。 更多...
 
static e_NewWindowFlagNone
 无"NewWindow"标志。
 
static e_NewWindowFlagTrue
 "NewWindow"标志为 true
 
static e_TypeGoto
 操作类型:跳转操作。
 
static e_TypeGoTo3DView
 操作类型:跳转到 3D 视图操作。
 
static e_TypeGoToE
 操作类型:嵌入式跳转操作。
 
static e_TypeGoToR
 操作类型:远程跳转操作。
 
static e_TypeHide
 操作类型:隐藏操作。
 
static e_TypeImportData
 操作类型:导入数据操作。
 
static e_TypeJavaScript
 操作类型:JavaScript 操作。
 
static e_TypeLaunch
 操作类型:启动操作。
 
static e_TypeMovie
 操作类型:影片操作。
 
static e_TypeNamed
 操作类型:命名操作。
 
static e_TypeRendition
 操作类型:演绎操作。
 
static e_TypeResetForm
 操作类型:重置表单操作。
 
static e_TypeSetOCGState
 操作类型:设置 OCG 状态操作。
 
static e_TypeSound
 操作类型:声音操作。
 
static e_TypeSubmitForm
 操作类型:提交表单操作。
 
static e_TypeThread
 操作类型:线程操作。
 
static e_TypeTrans
 操作类型:过渡操作。
 
static e_TypeUnknown
 操作类型的枚举。 更多...
 
static e_TypeURI
 操作类型:统一资源标识符 (URI) 操作。
 

详细描述

PDF 支持以下标准操作类型:
"Go-To Action"(跳转操作)、"Remote Go-To Action"(远程跳转操作)、"Embedded Go-To Action"(嵌入式跳转操作)、"Launch Action"(启动操作)、"Thread Action"(线程操作)、 "URI Action"(URI 操作)、"Sound Action"(声音操作)、"Movie Action"(影片操作)、"Hide Action"(隐藏操作)、"Named Action"(命名操作)、"Submit-Form Action"(提交表单操作)、 "Reset-Form Action"(重置表单操作)、"Import-Data Action"(导入数据操作)、"JavaScript Action"(JavaScript 操作)、"Set-OCG-State Action"(设置 OCG 状态操作)、 "Rendition Action"(演绎操作)、"Transition Action"(过渡操作)、"Go-To-3D-View Action"(跳转到 3D 视图操作)。
PDF 操作可能有子操作。当触发此操作时,其子操作也应 依次触发。
FSDK.Action 是所有 PDF 操作类型的基类。对于具体的操作类型,请参考 派生类。函数 FSDK.Action.Create 可用于创建新操作——目前仅支持 某些操作类型。请参考此函数的注释以获取更多详细信息。此类还提供修改子操作的函数。

成员函数说明

◆ constructor()

FSDK::Action::constructor ( document  ,
action_dict   
)

带参数的构造函数。

参数
[in]document有效的 PDF 文档对象。
[in]action_dict表示操作的 PDF 字典对象。

◆ Create()

static FSDK::Action::Create ( document  ,
action_type   
)
static

为指定的操作类型创建新操作。

新创建的操作尚未包含操作数据(除了操作类型)。 用户需要调用具体操作类中的函数来设置操作数据。

参数
[in]document有效的 PDF 文档,新操作属于该文档。
[in]action_type操作类型,用于指定要创建的操作类型。 目前仅支持:
FSDK.Action.e_TypeGotoFSDK.Action.e_TypeURIFSDK.Action.e_TypeJavaScriptFSDK.Action.e_TypeNamedFSDK.Action.e_TypeGoToRFSDK.Action.e_TypeGoToEFSDK.Action.e_TypeSubmitFormFSDK.Action.e_TypeResetFormFSDK.Action.e_TypeHideFSDK.Action.e_TypeLaunchFSDK.Action.e_TypeImportDataFSDK.Action.e_TypeRendition
返回
新的操作对象,不包含操作数据。

◆ GetDict()

FSDK::Action::GetDict ( )

获取当前对象的 PDF 字典。

返回
PDF 字典。如果出现任何错误,此函数将返回 null

◆ GetDocument()

FSDK::Action::GetDocument ( )

获取当前操作所属的 PDF 文档。

返回
PDF 文档对象。

◆ GetSubAction()

FSDK::Action::GetSubAction ( index  )

通过索引获取子操作。

参数
[in]index要检索的子操作的索引。有效范围:从 0 到(count-1)。 count 由函数 FSDK.Action.GetSubActionCount 返回。
返回
表示指定子操作的操作对象。

◆ GetSubActionCount()

FSDK::Action::GetSubActionCount ( )

获取子操作的数量。

返回
子操作的数量。

◆ GetType()

FSDK::Action::GetType ( )

获取操作类型。

返回
操作类型。请参考从 FSDK.Action.e_TypeGoto 开始的值, 这将是这些值之一。

◆ InsertSubAction()

FSDK::Action::InsertSubAction ( index  ,
sub_action   
)

将新子操作插入到索引指定的位置。

参数
[in]index新子操作插入位置的索引。
如果此索引值小于零,新子操作将被插入到第一个。
如果此索引值等于或大于当前子操作数量,新子操作将 被插入到最后。
[in]sub_action要插入的新子操作。目前仅支持以下类型 作为新子操作:
FSDK.Action.e_TypeGotoFSDK.Action.e_TypeURIFSDK.Action.e_TypeJavaScriptFSDK.Action.e_TypeNamedFSDK.Action.e_TypeGoToRFSDK.Action.e_TypeGoToEFSDK.Action.e_TypeSubmitFormFSDK.Action.e_TypeResetFormFSDK.Action.e_TypeHideFSDK.Action.e_TypeLaunchFSDK.Action.e_TypeImportDataFSDK.Action.e_TypeRendition
返回
无。

◆ IsEmpty()

FSDK::Action::IsEmpty ( )

检查当前对象是否为空。

当当前对象为空时,表示当前对象无用。

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

◆ RemoveAllSubActions()

FSDK::Action::RemoveAllSubActions ( )

删除所有子操作。

返回
无。

◆ RemoveSubAction()

FSDK::Action::RemoveSubAction ( index  )

删除由索引指定的子操作。

参数
[in]index要检索的子操作的索引。有效范围:从 0 到(count-1)。 count 由函数 FSDK.Action.GetSubActionCount 返回。
返回
无。

◆ SetSubAction()

FSDK::Action::SetSubAction ( index  ,
sub_action   
)

通过索引设置子操作。

参数
[in]index要检索的子操作的索引。有效范围:从 0 到(count-1)。 count 由函数 FSDK.Action.GetSubActionCount 返回。
[in]sub_action要设置为子操作的操作对象。目前仅支持以下类型 作为子操作:
FSDK.Action.e_TypeGotoFSDK.Action.e_TypeURIFSDK.Action.e_TypeJavaScriptFSDK.Action.e_TypeNamedFSDK.Action.e_TypeGoToRFSDK.Action.e_TypeGoToEFSDK.Action.e_TypeSubmitFormFSDK.Action.e_TypeResetFormFSDK.Action.e_TypeHideFSDK.Action.e_TypeLaunchFSDK.Action.e_TypeImportDataFSDK.Action.e_TypeRendition
返回
无。

类成员变量说明

◆ e_NewWindowFlagFalse

FSDK::Action::e_NewWindowFlagFalse
static

新窗口标志的枚举。

此枚举的值应单独使用。"NewWindow"标志为 false

◆ e_TypeUnknown

FSDK::Action::e_TypeUnknown
static

操作类型的枚举。

此枚举的值应单独使用。操作类型:未知操作。