Foxit PDF SDK
com.foxit.sdk.pdf.graphics.MarkedContent类 参考

Public 成员函数

int addItem (String tag_name, PDFDictionary property_dict) throws com.foxit.sdk.PDFException
 添加新的标记内容项。
更多...
 
synchronized void delete ()
 直接清除C++相关资源。 更多...
 
int getItemCount ()
 获取标记内容项的数量。
更多...
 
int getItemMCID (int index) throws com.foxit.sdk.PDFException
 根据索引获取指定标记内容项的标记内容标识符(MCID)。
更多...
 
PDFDictionary getItemPropertyDict (int index) throws com.foxit.sdk.PDFException
 根据索引获取指定标记内容项的属性字典。
更多...
 
String getItemTagName (int index) throws com.foxit.sdk.PDFException
 根据索引获取指定标记内容项的标签名称。
更多...
 
boolean hasTag (String tag_name) throws com.foxit.sdk.PDFException
 检查当前标记内容对象是否具有指定的标记内容项。
更多...
 
boolean removeItem (String tag_name) throws com.foxit.sdk.PDFException
 根据标签名称删除标记内容项。
更多...
 

详细描述

标记内容操作符(PDF 1.2)将PDF内容流的一部分标识为特定应用程序或PDF插件扩展感兴趣的标记内容元素。 更多详细信息,请参阅<PDF Reference 1.7>第10.5节"标记内容"。
要获取标记内容对象,请使用函数GraphicsObject.getMarkedContent

参见
GraphicsObject

成员函数说明

◆ addItem()

int com.foxit.sdk.pdf.graphics.MarkedContent.addItem ( String  tag_name,
PDFDictionary  property_dict 
) throws com.foxit.sdk.PDFException

添加新的标记内容项。

参数
[in]tag_name新的标签名称。它不应该是空字符串。 如果参数tag_name在当前标记内容对象中存在, 则不能再次添加到当前标记内容对象中。
[in]property_dict属性字典。默认值:nullnull 表示新的标记内容项将没有属性字典。
如果此字典是新创建的且尚未设置给其他对象,用户应在调用此函数后释放此字典对象。
返回
新添加的标记内容项的索引。如果有任何错误,此函数将返回-1。

◆ delete()

synchronized void com.foxit.sdk.pdf.graphics.MarkedContent.delete ( )

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

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

◆ getItemCount()

int com.foxit.sdk.pdf.graphics.MarkedContent.getItemCount ( )

获取标记内容项的数量。

标记内容对象可能一个嵌套在另一个内部,此函数用于获取当前标记内容序列中标记内容项的数量。

返回
标记内容项的数量。

◆ getItemMCID()

int com.foxit.sdk.pdf.graphics.MarkedContent.getItemMCID ( int  index) throws com.foxit.sdk.PDFException

根据索引获取指定标记内容项的标记内容标识符(MCID)。

参数
[in]index项索引。有效范围:从0到(count-1)。 count 由函数MarkedContent.getItemCount 返回。
返回
MCID值。负数表示指定的标记内容项没有MCID。

◆ getItemPropertyDict()

PDFDictionary com.foxit.sdk.pdf.graphics.MarkedContent.getItemPropertyDict ( int  index) throws com.foxit.sdk.PDFException

根据索引获取指定标记内容项的属性字典。

参数
[in]index项索引。有效范围:从0到(count-1)。 count 由函数MarkedContent.getItemCount 返回。
返回
属性字典。null 表示没有属性字典。

◆ getItemTagName()

String com.foxit.sdk.pdf.graphics.MarkedContent.getItemTagName ( int  index) throws com.foxit.sdk.PDFException

根据索引获取指定标记内容项的标签名称。

标记内容对象可能一个嵌套在另一个内部,此函数用于获取当前标记内容序列中标记内容项的数量。

参数
[in]index项索引。有效范围:从0到(count-1)。 count 由函数MarkedContent.getItemCount 返回。
返回
标签名称。

◆ hasTag()

boolean com.foxit.sdk.pdf.graphics.MarkedContent.hasTag ( String  tag_name) throws com.foxit.sdk.PDFException

检查当前标记内容对象是否具有指定的标记内容项。

参数
[in]tag_name要检查的标签名称。
返回
true 表示当前标记内容对象具有指定的标记内容项。 false 表示当前标记内容对象不具有指定的标记内容项。

◆ removeItem()

boolean com.foxit.sdk.pdf.graphics.MarkedContent.removeItem ( String  tag_name) throws com.foxit.sdk.PDFException

根据标签名称删除标记内容项。

参数
[in]tag_name标签名称。不应为空字符串。
返回
true 表示成功,false 表示失败。