Foxit PDF SDK
foxit::ofd::OFDDoc类 参考
类 foxit::ofd::OFDDoc 继承关系图:
foxit::Base

Public 类型

enum  EncryptMethod { e_OFDEncryptMethodNone = 0, e_OFDEncryptMethodPwd = 1, e_OFDEncryptMethodCert = 2 }
 OFD文档加密方法枚举类型。 更多...
 
enum  EncryptType {
  e_OFDEncryptTypeNone = 0, e_OFDEncryptTypeRC4 = 1, e_OFDEncryptTypeAES128 = 2, e_OFDEncryptTypeAES256 = 3,
  e_OFDEncryptTypeSM4 = 4
}
 OFD文档加密类型枚举类型。 更多...
 
enum  ResourceType {
  e_OFDResourceTypeUnknown = 0, e_OFDResourceTypeColorSpace = 1, e_OFDResourceTypeDrawParam = 2, e_OFDResourceTypeFont = 3,
  e_OFDResourceTypeMultimedia = 4, e_OFDResourceTypeCompositeGraphicUnit = 5
}
 OFD资源类型枚举类型。 更多...
 

Public 成员函数

 OFDDoc (const foxit::fld::FLDDoc &doc)
 构造函数,从现有foxit::fld::FLDDoc对象。 更多...
 
 OFDDoc (const OFDDoc &other)
 构造函数,通过另一个OFD文档对象。 更多...
 
 ~OFDDoc ()
 析构函数。
 
Attachment AddAttachment (const String &file_name, const String &name=0, const String &usage=0)
 添加附件。 更多...
 
Attachment AddAttachment (const WString &file_name, const String &name=0, const String &usage=0)
 添加附件。 更多...
 
bool AddCatalog (const Catalog &catalog)
 添加目录。 更多...
 
void AddCustomData (const String &key, const String &value)
 添加OFD自定义数据。 更多...
 
foxit::uint32 AddFontResourceFromName (const String &font_family, const String &font_name)
 添加字体资源到OFD文档。 更多...
 
foxit::uint32 AddImageResourceFromBuffer (const String &buffer, foxit::common::Image::Type format)
 从图片文件添加资源到OFD文档。 更多...
 
foxit::uint32 AddImageResourceFromFile (const String &file_path)
 从图片文件添加资源到OFD文档。 更多...
 
foxit::uint32 AddImageResourceFromFile (const WString &file_path)
 从图片文件添加资源到OFD文档。 更多...
 
OFDPage AddPage ()
 添加新的页面。 更多...
 
OFDPage AddPageFromTemplatePage (int index, int dest_index=-1)
 添加新的页面。 更多...
 
void AddPageNumber (const PageNumberParameter &param)
 根据页码参数添加页码。 更多...
 
foxit::uint32 AddResourceFromFile (const String &file_path, const String &format)
 从文件添加资源到OFD文档。 更多...
 
foxit::uint32 AddResourceFromFile (const WString &file_path, const String &format)
 从文件添加资源到OFD文档。 更多...
 
void AddTagTreeNodeMetaData (const String &key, const String &value)
 添加自定义票据标引树节点元数据。 更多...
 
OFDTemplatePage AddTemplatePage ()
 添加新的模板页面。 更多...
 
OFDTemplatePage AddTemplatePageFromPage (OFDPage page)
 添加新的模板页面。 更多...
 
void BeginTagTreeNode (const String &key_path)
 开始添加票据标引节点。 更多...
 
void ClearTagTreeNode ()
 清除票据标引所有节点。 更多...
 
Attachments CreateAttachments ()
 创建OFD附件集合。 更多...
 
Bookmarks CreateBookmarks ()
 创建书签。 更多...
 
CustomTags CreateCustomTags ()
 创建自定义标签。 更多...
 
Outline CreateOutline ()
 创建大纲。 更多...
 
OFDPermission CreatePermissions ()
 创建权限对象。 更多...
 
void CreateVersion ()
 创建版本,并切换到该版本。只能创建一个版本。 更多...
 
bool CustomEncrypt (const String &security_type, const String &crypto_type, int key_length, const String &user_password, const String &owner_password)
 对文档进行自定义加密。必须先调用 OFDSecurity::RegisterHandler 方法注册自定义加密处理器。 更多...
 
void EmbedFont (const String &font_name)
 内嵌字体。 更多...
 
void EndTagTreeNode (const String &key_path)
 结束添加票据标引节点。 更多...
 
void ExportAnnots (const String &file_path)
 导出注释。 更多...
 
void ExportAnnots (int start_index, int end_index, const String &file_path)
 导出注释。 更多...
 
void ExportAttachment (int index, const String &file_path)
 保存附件到文件中。 更多...
 
void ExportAttachment (int index, const WString &file_path)
 保存附件到文件中。 更多...
 
void ExportAttachment (int index, foxit::common::file::WriterCallback *file_writer)
 保存附件到文件中。 更多...
 
void ExportMultiMediaByID (foxit::uint32 res_id, const String &file_path)
 保存多媒体文件。 更多...
 
void ExportMultiMediaByID (foxit::uint32 res_id, const WString &file_path)
 保存多媒体文件。 更多...
 
void ExportMultiMediaByID (foxit::uint32 res_id, foxit::common::file::WriterCallback *file_writer)
 保存多媒体文件。 更多...
 
bool ExportOfficeDoc (const String &file_path)
 导出公文语义xml文件。 更多...
 
bool ExportOfficeDoc (const WString &file_path)
 导出公文语义xml文件。 更多...
 
Attachment GetAttachment (int index)
 获取OFD附件对象。 更多...
 
String GetAttachmentBuffer (int index)
 获取OFD附件内存缓冲区。 更多...
 
Attachment GetAttachmentByName (const String &name)
 获取OFD附件对象。 更多...
 
int GetAttachmentCount ()
 获取OFD附件数量 更多...
 
foxit::common::file::ReaderCallbackGetAttachmentFile (int index)
 获取OFD附件文件指针。 更多...
 
Attachments GetAttachments ()
 获取OFD附件集合。 更多...
 
Bookmarks GetBookmarks ()
 获取书签。 更多...
 
int GetCustomDataCount ()
 获取OFD自定义数据数量。 更多...
 
WString GetCustomDataName (int index)
 获取OFD自定义数据。 更多...
 
WString GetCustomDataValue (int index)
 获取OFD自定义值。 更多...
 
CustomTags GetCustomTags ()
 获取自定义标签。 更多...
 
int GetKeywordCount ()
 获取OFD Metadata项数量。 更多...
 
WString GetMetadata (const WString &key)
 获取OFD Metadata项。 更多...
 
String GetMultiMediaBufferByID (foxit::uint32 res_id)
 获取多媒体内存缓冲区。 更多...
 
foxit::common::file::ReaderCallbackGetMultiMediaFileByID (int res_id)
 通过资源ID获取多媒体文件指针。 更多...
 
WString GetMultiMediaFileNameByID (foxit::uint32 res_id)
 获取多媒体文件名。 更多...
 
WString GetMultiMediaFormatByID (foxit::uint32 res_id)
 获取多媒体格式。 更多...
 
WString GetMultiMediaTypeByID (foxit::uint32 res_id)
 获取多媒体类型。 更多...
 
Outline GetOutline ()
 获取大纲。 更多...
 
OFDPage GetPage (int index)
 获取OFD页面。 更多...
 
OFDPage GetPageByID (foxit::uint32 id)
 获取OFD页面。 更多...
 
int GetPageCount ()
 获取OFD文档页面数量。 更多...
 
OFDPermission GetPermissions ()
 获取权限对象。 更多...
 
ResourceType GetResourceTypeByID (foxit::uint32 res_id)
 获取资源类型通过资源ID。 更多...
 
ofdseal::Signature GetSignature (int index)
 获取签名或签章对象。 更多...
 
int GetSignatureCount ()
 获取签名和签章数量。 更多...
 
TagTreeNode GetTagTreeRoot (const String &type)
 获取指定类型的票据标引树根节点。 更多...
 
OFDTemplatePage GetTemplatePage (int index)
 获取OFD模板页面。 更多...
 
OFDTemplatePage GetTemplatePageByID (int id)
 获取OFD模板页面。 更多...
 
OFDTemplatePage GetTemplatePageByName (const String &name)
 获取OFD模板页面。 更多...
 
int GetTemplatePageCount ()
 获取OFD文档模板页面数量。 更多...
 
int GetVersionCount ()
 获取版本数量。 更多...
 
int GetXmlFileAttachmentCount ()
 获取OFD XML附件数量 更多...
 
void ImportAnnots (const String &file_path)
 导入注释。 更多...
 
void InitializeCertTagTreeNode (bool key_unique)
 在文档中初始化电子证照标引树根节点。 更多...
 
void InitializeTagTreeNode (const String &type, const String &name_space, const String &name, const String &file_extension, bool key_unique)
 在文档中初始化指定类型的票据标引树根节点。 更多...
 
void InsertCustomData (const String &key, const String &value, int index)
 插入OFD自定义数据。 更多...
 
bool InsertDocument (const OFDDoc &other, int dest_index=-1)
 插入新的文档。 更多...
 
void InsertKeyword (const WString &keyword, int index=-1)
 插入关键字到OFD Metadata项。 更多...
 
OFDPage InsertPage (int index)
 插入新的OFD页面。 更多...
 
OFDTemplatePage InsertTemplatePage (int index)
 插入模板页面。 更多...
 
bool IsEmpty () const
 检查当前对象是否为空。 更多...
 
bool MovePage (int index, int dest_index)
 移动页面到指定索引。 更多...
 
bool operator != (const OFDDoc &other) const
 不相等操作符。 更多...
 
OFDDocoperator= (const OFDDoc &other)
 赋值操作符。 更多...
 
bool operator== (const OFDDoc &other) const
 相等操作符。 更多...
 
bool RefreshObjectsPermission (bool authenticated)
 刷新文档所有对象权限。 更多...
 
void RemoveAllTemplatePages ()
 删除所有模板页面。 更多...
 
void RemoveCustomData (int index)
 删除OFD自定义数据。 更多...
 
bool RemoveEncryption (const String &owner_password)
 移除文档加密。 更多...
 
void RemoveKeyword (int index)
 删除指定关键字。 更多...
 
bool RemoveOutline ()
 删除所有大纲节点。 更多...
 
void RemovePage (int index)
 删除指定的OFD页面。 更多...
 
void RemoveTemplatePage (int index)
 删除模板页面。 更多...
 
void ReservedPage (int index)
 指定保存需要保留的OFD页面。保存后,未保留的页面将被删除。 更多...
 
bool RestoreOriginalDocument ()
 恢复到原始文档。 更多...
 
bool SaveXmlFileAttachment (int index, const String &file_path)
 保存XML附件到文件中。 更多...
 
bool SaveXmlFileAttachment (int index, const WString &file_path)
 保存XML附件到文件中。 更多...
 
void SetCurrentVersion (int index)
 设置当前版本。 更多...
 
void SetMetadata (const WString &key, const WString &value)
 设置OFD Metadata项。 更多...
 
- Public 成员函数 继承自 foxit::Base
FS_HANDLE Handle () const
 获取当前对象的句柄。 更多...
 

详细描述

此类表示和OFD文档相关的方法。

成员枚举类型说明

◆ EncryptMethod

OFD文档加密方法枚举类型。

该枚举值应单独使用。

枚举值
e_OFDEncryptMethodNone 

加密方法:无。

e_OFDEncryptMethodPwd 

加密方法:密码加密

e_OFDEncryptMethodCert 

加密方法:证书加密

◆ EncryptType

OFD文档加密类型枚举类型。

该枚举值应单独使用。

枚举值
e_OFDEncryptTypeNone 

加密类型:无。

e_OFDEncryptTypeRC4 

加密类型:RC4。

e_OFDEncryptTypeAES128 

加密类型:AES128。

e_OFDEncryptTypeAES256 

加密类型:AES256。

e_OFDEncryptTypeSM4 

加密类型:SM4。

◆ ResourceType

OFD资源类型枚举类型。

该枚举值应单独使用。

枚举值
e_OFDResourceTypeUnknown 

未知类型。

e_OFDResourceTypeColorSpace 

颜色空间资源类型。

e_OFDResourceTypeDrawParam 

绘制参数资源类型。

e_OFDResourceTypeFont 

字体资源类型。

e_OFDResourceTypeMultimedia 

多媒体资源类型。

e_OFDResourceTypeCompositeGraphicUnit 

复合图形单元资源类型。

构造及析构函数说明

◆ OFDDoc() [1/2]

foxit::ofd::OFDDoc::OFDDoc ( const foxit::fld::FLDDoc doc)
explicit

构造函数,从现有foxit::fld::FLDDoc对象。

参数
[in]docFLD文档对象。

◆ OFDDoc() [2/2]

foxit::ofd::OFDDoc::OFDDoc ( const OFDDoc other)

构造函数,通过另一个OFD文档对象。

参数
[in]other另一个OFD文档对象。

成员函数说明

◆ AddAttachment() [1/2]

Attachment foxit::ofd::OFDDoc::AddAttachment ( const String file_name,
const String name = 0,
const String usage = 0 
)

添加附件。

参数
[in]file_name附件路径。
[in]name附件名称。
[in]usage附件用途。
返回
附件对象。

◆ AddAttachment() [2/2]

Attachment foxit::ofd::OFDDoc::AddAttachment ( const WString file_name,
const String name = 0,
const String usage = 0 
)

添加附件。

参数
[in]file_name附件路径。
[in]name附件名称。
[in]usage附件用途。
返回
附件对象。

◆ AddCatalog()

bool foxit::ofd::OFDDoc::AddCatalog ( const Catalog catalog)

添加目录。

参数
[in]catalog目录对象。
返回
true表示添加成功,false表示添加失败。

◆ AddCustomData()

void foxit::ofd::OFDDoc::AddCustomData ( const String key,
const String value 
)

添加OFD自定义数据。

参数
[in]key自定义数据关键字。
[in]value自定义数据值。
返回
无。

◆ AddFontResourceFromName()

foxit::uint32 foxit::ofd::OFDDoc::AddFontResourceFromName ( const String font_family,
const String font_name 
)

添加字体资源到OFD文档。

参数
[in]font_family字体家族名称。
[in]font_name字体名称。
返回
资源ID。

◆ AddImageResourceFromBuffer()

foxit::uint32 foxit::ofd::OFDDoc::AddImageResourceFromBuffer ( const String buffer,
foxit::common::Image::Type  format 
)

从图片文件添加资源到OFD文档。

参数
[in]buffer图片内存缓冲区。
[in]format图片格式。 请参考从 foxit::common::Image::Type::e_None 开始的值。 不支持 foxit::common::Image::Type::e_WEBP 格式。
返回
资源ID。

◆ AddImageResourceFromFile() [1/2]

foxit::uint32 foxit::ofd::OFDDoc::AddImageResourceFromFile ( const String file_path)

从图片文件添加资源到OFD文档。

参数
[in]file_path资源文件路径。它不应该是空字符串。
返回
资源ID。

◆ AddImageResourceFromFile() [2/2]

foxit::uint32 foxit::ofd::OFDDoc::AddImageResourceFromFile ( const WString file_path)

从图片文件添加资源到OFD文档。

参数
[in]file_path资源文件路径。它不应该是空字符串。图片格式不支持webp。
返回
资源ID。

◆ AddPage()

OFDPage foxit::ofd::OFDDoc::AddPage ( )

添加新的页面。

返回
在最后一页后添加新的OFD页面对象。

◆ AddPageFromTemplatePage()

OFDPage foxit::ofd::OFDDoc::AddPageFromTemplatePage ( int  index,
int  dest_index = -1 
)

添加新的页面。

参数
[in]index用于创建页面的模板页面索引。 有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetTemplatePageCount 返回。
[in]dest_index插入的页面索引。有效范围:从0到(count)。 count 由函数 OFDDoc::GetPageCount 返回。 默认值-1表示在最后一页后添加。
返回
页面对象。

◆ AddPageNumber()

void foxit::ofd::OFDDoc::AddPageNumber ( const PageNumberParameter param)

根据页码参数添加页码。

参数
[in]param页面页码参数结构体对象。
返回
无。

◆ AddResourceFromFile() [1/2]

foxit::uint32 foxit::ofd::OFDDoc::AddResourceFromFile ( const String file_path,
const String format 
)

从文件添加资源到OFD文档。

参数
[in]file_path资源文件路径。只能是mp4文件或者图片文件。它不应该是空字符串。
[in]format资源格式。只能是mp4或者图片格式,图片格式不支持webp、jpx。
返回
资源ID。

◆ AddResourceFromFile() [2/2]

foxit::uint32 foxit::ofd::OFDDoc::AddResourceFromFile ( const WString file_path,
const String format 
)

从文件添加资源到OFD文档。

参数
[in]file_path资源文件路径。只能是mp4文件或者图片文件。它不应该是空字符串。
[in]format资源格式。只能是mp4或者图片格式,图片格式不支持webp、jpx。
返回
资源ID。

◆ AddTagTreeNodeMetaData()

void foxit::ofd::OFDDoc::AddTagTreeNodeMetaData ( const String key,
const String value 
)

添加自定义票据标引树节点元数据。

参数
[in]key元数据关键字。
[in]value元数据值。
返回
无。

◆ AddTemplatePage()

OFDTemplatePage foxit::ofd::OFDDoc::AddTemplatePage ( )

添加新的模板页面。

返回
模板页面对象。

◆ AddTemplatePageFromPage()

OFDTemplatePage foxit::ofd::OFDDoc::AddTemplatePageFromPage ( OFDPage  page)

添加新的模板页面。

参数
[in]page用于创建模板页面的OFD页面对象。
返回
模板页面对象。

◆ BeginTagTreeNode()

void foxit::ofd::OFDDoc::BeginTagTreeNode ( const String key_path)

开始添加票据标引节点。

参数
[in]key_path票据标引节点路径。
返回
无。

◆ ClearTagTreeNode()

void foxit::ofd::OFDDoc::ClearTagTreeNode ( )

清除票据标引所有节点。

返回
无。

◆ CreateAttachments()

Attachments foxit::ofd::OFDDoc::CreateAttachments ( )

创建OFD附件集合。

返回
附件集合对象。

◆ CreateBookmarks()

Bookmarks foxit::ofd::OFDDoc::CreateBookmarks ( )

创建书签。

返回
书签对象。

◆ CreateCustomTags()

CustomTags foxit::ofd::OFDDoc::CreateCustomTags ( )

创建自定义标签。

返回
自定义标签对象。

◆ CreateOutline()

Outline foxit::ofd::OFDDoc::CreateOutline ( )

创建大纲。

返回
大纲对象。

◆ CreatePermissions()

OFDPermission foxit::ofd::OFDDoc::CreatePermissions ( )

创建权限对象。

返回
权限对象。

◆ CreateVersion()

void foxit::ofd::OFDDoc::CreateVersion ( )

创建版本,并切换到该版本。只能创建一个版本。

返回
无。

◆ CustomEncrypt()

bool foxit::ofd::OFDDoc::CustomEncrypt ( const String security_type,
const String crypto_type,
int  key_length,
const String user_password,
const String owner_password 
)

对文档进行自定义加密。必须先调用 OFDSecurity::RegisterHandler 方法注册自定义加密处理器。

参数
[in]security_type安全类型。
[in]crypto_type加密算法类型。
[in]key_length密钥长度。
[in]user_password用户密码,用户密码和所有者密码不能全部为空。
[in]owner_password所有者密码,用户密码和所有者密码不能全部为空。
返回
true表示加密成功,false表示加密失败。

◆ EmbedFont()

void foxit::ofd::OFDDoc::EmbedFont ( const String font_name)

内嵌字体。

参数
[in]font_name字体名称,必须是OFD中使用的字体。 否则什么都不会发生。
返回
无。

◆ EndTagTreeNode()

void foxit::ofd::OFDDoc::EndTagTreeNode ( const String key_path)

结束添加票据标引节点。

参数
[in]key_path票据标引节点路径。
返回
无。

◆ ExportAnnots() [1/2]

void foxit::ofd::OFDDoc::ExportAnnots ( const String file_path)

导出注释。

参数
[in]file_path导出注释文件的文件路径。它不应该是空字符串。
返回
无。

◆ ExportAnnots() [2/2]

void foxit::ofd::OFDDoc::ExportAnnots ( int  start_index,
int  end_index,
const String file_path 
)

导出注释。

参数
[in]start_index起始页面索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetPageCount 返回。
[in]end_index终止页面索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetPageCount 返回。
[in]file_path导出注释文件的文件路径。它不应该是空字符串。
返回
无。

◆ ExportAttachment() [1/3]

void foxit::ofd::OFDDoc::ExportAttachment ( int  index,
const String file_path 
)

保存附件到文件中。

参数
[in]index附件索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetAttachmentCount 返回。
[in]file_path保存附件的文件路径。它不应该是空字符串。
返回
无。

◆ ExportAttachment() [2/3]

void foxit::ofd::OFDDoc::ExportAttachment ( int  index,
const WString file_path 
)

保存附件到文件中。

参数
[in]index附件索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetAttachmentCount 返回。
[in]file_path保存附件的文件路径。它不应该是空字符串。
返回
无。

◆ ExportAttachment() [3/3]

void foxit::ofd::OFDDoc::ExportAttachment ( int  index,
foxit::common::file::WriterCallback file_writer 
)

保存附件到文件中。

参数
[in]index附件索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetAttachmentCount 返回。
[in]file_writer用户实现的 common::file::WriterCallback 对象,用于保存附件文档。
返回
无。

◆ ExportMultiMediaByID() [1/3]

void foxit::ofd::OFDDoc::ExportMultiMediaByID ( foxit::uint32  res_id,
const String file_path 
)

保存多媒体文件。

参数
[in]res_id资源ID。
[in]file_path保存多媒体文件的文件路径。它不应该是空字符串。
返回
无。

◆ ExportMultiMediaByID() [2/3]

void foxit::ofd::OFDDoc::ExportMultiMediaByID ( foxit::uint32  res_id,
const WString file_path 
)

保存多媒体文件。

参数
[in]res_id资源ID。
[in]file_path保存多媒体文件的文件路径。它不应该是空字符串。
返回
无。

◆ ExportMultiMediaByID() [3/3]

void foxit::ofd::OFDDoc::ExportMultiMediaByID ( foxit::uint32  res_id,
foxit::common::file::WriterCallback file_writer 
)

保存多媒体文件。

参数
[in]res_id资源ID。
[in]file_writer保存多媒体文件的用户实现的 common::file::WriterCallback 对象。
返回
无。

◆ ExportOfficeDoc() [1/2]

bool foxit::ofd::OFDDoc::ExportOfficeDoc ( const String file_path)

导出公文语义xml文件。

参数
[in]file_path导出公文语义xml文件的文件路径。它不应该是空字符串。
返回
true表示导出成功,false表示导出失败。

◆ ExportOfficeDoc() [2/2]

bool foxit::ofd::OFDDoc::ExportOfficeDoc ( const WString file_path)

导出公文语义xml文件。

参数
[in]file_path导出公文语义xml文件的文件路径。它不应该是空字符串。
返回
true表示导出成功,false表示导出失败。

◆ GetAttachment()

Attachment foxit::ofd::OFDDoc::GetAttachment ( int  index)

获取OFD附件对象。

参数
[in]index附件索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetAttachmentCount 返回。
返回
OFD附件对象。

◆ GetAttachmentBuffer()

String foxit::ofd::OFDDoc::GetAttachmentBuffer ( int  index)

获取OFD附件内存缓冲区。

参数
[in]index附件索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetAttachmentCount 返回。
返回
OFD附件内存缓冲区。

◆ GetAttachmentByName()

Attachment foxit::ofd::OFDDoc::GetAttachmentByName ( const String name)

获取OFD附件对象。

参数
[in]name附件名。
返回
OFD附件对象。

◆ GetAttachmentCount()

int foxit::ofd::OFDDoc::GetAttachmentCount ( )

获取OFD附件数量

返回
附件数量。

◆ GetAttachmentFile()

foxit::common::file::ReaderCallback* foxit::ofd::OFDDoc::GetAttachmentFile ( int  index)

获取OFD附件文件指针。

参数
[in]index附件索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetAttachmentCount 返回。
返回
OFD附件文件指针对象。

◆ GetAttachments()

Attachments foxit::ofd::OFDDoc::GetAttachments ( )

获取OFD附件集合。

返回
附件集合对象。

◆ GetBookmarks()

Bookmarks foxit::ofd::OFDDoc::GetBookmarks ( )

获取书签。

返回
书签对象。

◆ GetCustomDataCount()

int foxit::ofd::OFDDoc::GetCustomDataCount ( )

获取OFD自定义数据数量。

返回
自定义数据数量。

◆ GetCustomDataName()

WString foxit::ofd::OFDDoc::GetCustomDataName ( int  index)

获取OFD自定义数据。

参数
[in]index自定义数据索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetCustomDataCount 返回。
返回
自定义数据数量。

◆ GetCustomDataValue()

WString foxit::ofd::OFDDoc::GetCustomDataValue ( int  index)

获取OFD自定义值。

参数
[in]index自定义数据索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetCustomDataCount 返回。
返回
自定义数据数量。

◆ GetCustomTags()

CustomTags foxit::ofd::OFDDoc::GetCustomTags ( )

获取自定义标签。

返回
自定义标签对象。

◆ GetKeywordCount()

int foxit::ofd::OFDDoc::GetKeywordCount ( )

获取OFD Metadata项数量。

返回
Metadata项数量。

◆ GetMetadata()

WString foxit::ofd::OFDDoc::GetMetadata ( const WString key)

获取OFD Metadata项。

参数
[in]key关键字。
返回
关键字对应的值。

◆ GetMultiMediaBufferByID()

String foxit::ofd::OFDDoc::GetMultiMediaBufferByID ( foxit::uint32  res_id)

获取多媒体内存缓冲区。

参数
[in]res_id资源ID。
返回
多媒体内存缓冲区。

◆ GetMultiMediaFileByID()

foxit::common::file::ReaderCallback* foxit::ofd::OFDDoc::GetMultiMediaFileByID ( int  res_id)

通过资源ID获取多媒体文件指针。

参数
[in]res_id资源ID。
返回
多媒体文件指针对象。

◆ GetMultiMediaFileNameByID()

WString foxit::ofd::OFDDoc::GetMultiMediaFileNameByID ( foxit::uint32  res_id)

获取多媒体文件名。

参数
[in]res_id资源ID。
返回
多媒体文件名。

◆ GetMultiMediaFormatByID()

WString foxit::ofd::OFDDoc::GetMultiMediaFormatByID ( foxit::uint32  res_id)

获取多媒体格式。

参数
[in]res_id资源ID。
返回
多媒体格式。

◆ GetMultiMediaTypeByID()

WString foxit::ofd::OFDDoc::GetMultiMediaTypeByID ( foxit::uint32  res_id)

获取多媒体类型。

参数
[in]res_id资源ID。
返回
多媒体类型。

◆ GetOutline()

Outline foxit::ofd::OFDDoc::GetOutline ( )

获取大纲。

返回
大纲对象。

◆ GetPage()

OFDPage foxit::ofd::OFDDoc::GetPage ( int  index)

获取OFD页面。

参数
[in]index页面索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetPageCount 返回。
返回
OFD页面对象。

◆ GetPageByID()

OFDPage foxit::ofd::OFDDoc::GetPageByID ( foxit::uint32  id)

获取OFD页面。

参数
[in]id页面ID。
返回
OFD页面对象。

◆ GetPageCount()

int foxit::ofd::OFDDoc::GetPageCount ( )

获取OFD文档页面数量。

返回
OFD文档页面数量。

◆ GetPermissions()

OFDPermission foxit::ofd::OFDDoc::GetPermissions ( )

获取权限对象。

返回
权限对象。

◆ GetResourceTypeByID()

ResourceType foxit::ofd::OFDDoc::GetResourceTypeByID ( foxit::uint32  res_id)

获取资源类型通过资源ID。

参数
[in]res_id资源ID。
返回
资源类型。 请参考从 ResourceType::e_OFDResourceTypeUnknown 开始的值。

◆ GetSignature()

ofdseal::Signature foxit::ofd::OFDDoc::GetSignature ( int  index)

获取签名或签章对象。

参数
[in]index签章索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetSignatureCount 返回。
返回
签名或签章对象。

◆ GetSignatureCount()

int foxit::ofd::OFDDoc::GetSignatureCount ( )

获取签名和签章数量。

返回
签名和签章数量。

◆ GetTagTreeRoot()

TagTreeNode foxit::ofd::OFDDoc::GetTagTreeRoot ( const String type)

获取指定类型的票据标引树根节点。

参数
[in]type票据标引类型,例如电子证照类型"Cert"。
返回
票据标引树根节点对象。

◆ GetTemplatePage()

OFDTemplatePage foxit::ofd::OFDDoc::GetTemplatePage ( int  index)

获取OFD模板页面。

参数
[in]index页面索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetTemplatePageCount 返回。
返回
OFD模板页面对象。

◆ GetTemplatePageByID()

OFDTemplatePage foxit::ofd::OFDDoc::GetTemplatePageByID ( int  id)

获取OFD模板页面。

参数
[in]id模板页面id。
返回
OFD模板页面对象。

◆ GetTemplatePageByName()

OFDTemplatePage foxit::ofd::OFDDoc::GetTemplatePageByName ( const String name)

获取OFD模板页面。

参数
[in]name模板页面名字。
返回
OFD模板页面对象。

◆ GetTemplatePageCount()

int foxit::ofd::OFDDoc::GetTemplatePageCount ( )

获取OFD文档模板页面数量。

返回
OFD文档模板数量。

◆ GetVersionCount()

int foxit::ofd::OFDDoc::GetVersionCount ( )

获取版本数量。

返回
无。

◆ GetXmlFileAttachmentCount()

int foxit::ofd::OFDDoc::GetXmlFileAttachmentCount ( )

获取OFD XML附件数量

返回
附件数量。

◆ ImportAnnots()

void foxit::ofd::OFDDoc::ImportAnnots ( const String file_path)

导入注释。

参数
[in]file_path导入注释文件的文件路径。它不应该是空字符串。
返回
无。

◆ InitializeCertTagTreeNode()

void foxit::ofd::OFDDoc::InitializeCertTagTreeNode ( bool  key_unique)

在文档中初始化电子证照标引树根节点。

参数
[in]key_unique票据标引键是否唯一,true表示唯一,false表示不唯一。
返回
无。

◆ InitializeTagTreeNode()

void foxit::ofd::OFDDoc::InitializeTagTreeNode ( const String type,
const String name_space,
const String name,
const String file_extension,
bool  key_unique 
)

在文档中初始化指定类型的票据标引树根节点。

参数
[in]type票据标引类型,例如电子证照类型"Cert"。
[in]name_space票据标引命名空间,例如电子证照命名空间"Cert"。
[in]name票据标引名称,例如电子证照名称"电子证照"。
[in]file_extension票据标引文件扩展名,例如电子证照“Certificate”,生成的标引文件为"Tag_Certificate.xml"。
[in]key_unique票据标引键是否唯一,true表示唯一,false表示不唯一。
返回
无。

◆ InsertCustomData()

void foxit::ofd::OFDDoc::InsertCustomData ( const String key,
const String value,
int  index 
)

插入OFD自定义数据。

参数
[in]key自定义数据关键字。
[in]value自定义数据值。
[in]index插入的自定义数据索引。
返回
无。

◆ InsertDocument()

bool foxit::ofd::OFDDoc::InsertDocument ( const OFDDoc other,
int  dest_index = -1 
)

插入新的文档。

参数
[in]other被插入的文档对象。
[in]dest_index插入的页面索引,默认值为-1,表示插入到最后面。 有效范围:从-1到(count - 1)。count 由函数 OFDDoc::GetPageCount 返回。
返回
true表示插入文档成功,false表示插入文档失败。

◆ InsertKeyword()

void foxit::ofd::OFDDoc::InsertKeyword ( const WString keyword,
int  index = -1 
)

插入关键字到OFD Metadata项。

参数
[in]keyword关键字。
[in]index插入的关键字索引,默认值为-1。
返回
无。

◆ InsertPage()

OFDPage foxit::ofd::OFDDoc::InsertPage ( int  index)

插入新的OFD页面。

参数
[in]index新的页面索引。有效范围:从0到(count)。 count 由函数 OFDDoc::GetPageCount 返回。
返回
OFD页面对象。

◆ InsertTemplatePage()

OFDTemplatePage foxit::ofd::OFDDoc::InsertTemplatePage ( int  index)

插入模板页面。

参数
[in]index插入的页面索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetTemplatePageCount 返回。
返回
OFD模板页面对象。

◆ IsEmpty()

bool foxit::ofd::OFDDoc::IsEmpty ( ) const

检查当前对象是否为空。

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

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

◆ MovePage()

bool foxit::ofd::OFDDoc::MovePage ( int  index,
int  dest_index 
)

移动页面到指定索引。

参数
[in]index要移动页面索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetPageCount 返回。
[in]dest_index页面目的地索引。有效范围:从0到(count)。 count 由函数 OFDDoc::GetPageCount 返回。
返回
true表示移动成功,false表示移动失败。

◆ operator !=()

bool foxit::ofd::OFDDoc::operator != ( const OFDDoc other) const

不相等操作符。

参数
[in]other另一个OFD文档对象。此函数将检查当前对象是否不等于这个对象。
返回
true 表示不相等,false 表示相等。

◆ operator=()

OFDDoc& foxit::ofd::OFDDoc::operator= ( const OFDDoc other)

赋值操作符。

参数
[in]other另一个OFD文档对象,其值将被赋给当前对象。
返回
当前对象自身的引用。

◆ operator==()

bool foxit::ofd::OFDDoc::operator== ( const OFDDoc other) const

相等操作符。

参数
[in]other另一个OFD文档对象。此函数将检查当前对象是否等于这个对象。
返回
true 表示相等,false 表示不相等。

◆ RefreshObjectsPermission()

bool foxit::ofd::OFDDoc::RefreshObjectsPermission ( bool  authenticated)

刷新文档所有对象权限。

参数
[in]authenticated是否通过认证。
返回
true表示刷新成功,false表示刷新失败。

◆ RemoveAllTemplatePages()

void foxit::ofd::OFDDoc::RemoveAllTemplatePages ( )

删除所有模板页面。

返回
无。

◆ RemoveCustomData()

void foxit::ofd::OFDDoc::RemoveCustomData ( int  index)

删除OFD自定义数据。

参数
[in]index要删除的自定义数据索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetCustomDataCount 返回。
返回
true表示删除成功,false表示删除失败。

◆ RemoveEncryption()

bool foxit::ofd::OFDDoc::RemoveEncryption ( const String owner_password)

移除文档加密。

参数
[in]owner_password所有者密码。
返回
true表示移除成功,false表示移除失败。

◆ RemoveKeyword()

void foxit::ofd::OFDDoc::RemoveKeyword ( int  index)

删除指定关键字。

参数
[in]index要删除的关键字索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetKeywordCount 返回。
返回
无。

◆ RemoveOutline()

bool foxit::ofd::OFDDoc::RemoveOutline ( )

删除所有大纲节点。

返回
true表示删除成功,false表示删除失败。

◆ RemovePage()

void foxit::ofd::OFDDoc::RemovePage ( int  index)

删除指定的OFD页面。

参数
[in]index要删除的页面索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetPageCount 返回。
返回
无。

◆ RemoveTemplatePage()

void foxit::ofd::OFDDoc::RemoveTemplatePage ( int  index)

删除模板页面。

参数
[in]index删除页面索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetTemplatePageCount 返回。
返回
无。

◆ ReservedPage()

void foxit::ofd::OFDDoc::ReservedPage ( int  index)

指定保存需要保留的OFD页面。保存后,未保留的页面将被删除。

参数
[in]index保留页面索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetPageCount 返回。
返回
无。

◆ RestoreOriginalDocument()

bool foxit::ofd::OFDDoc::RestoreOriginalDocument ( )

恢复到原始文档。

返回
true表示恢复成功,false表示恢复失败。

◆ SaveXmlFileAttachment() [1/2]

bool foxit::ofd::OFDDoc::SaveXmlFileAttachment ( int  index,
const String file_path 
)

保存XML附件到文件中。

参数
[in]indexXML附件索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetXmlFileAttachmentCount 返回。
[in]file_path保存附件的文件路径。它不应该是空字符串。
返回
true表示删除成功,false表示删除失败。

◆ SaveXmlFileAttachment() [2/2]

bool foxit::ofd::OFDDoc::SaveXmlFileAttachment ( int  index,
const WString file_path 
)

保存XML附件到文件中。

参数
[in]indexXML附件索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetXmlFileAttachmentCount 返回。
[in]file_path保存附件的文件路径。它不应该是空字符串。
返回
true表示删除成功,false表示删除失败。

◆ SetCurrentVersion()

void foxit::ofd::OFDDoc::SetCurrentVersion ( int  index)

设置当前版本。

参数
[in]index版本索引。有效范围:从0到(count-1)。 count 由函数 OFDDoc::GetVersionCount 返回。
返回
无。

◆ SetMetadata()

void foxit::ofd::OFDDoc::SetMetadata ( const WString key,
const WString value 
)

设置OFD Metadata项。

参数
[in]key关键字。
[in]value关键字对应的值。
返回
无。