TextFragmentAbsorber

TextFragmentAbsorber

概述

TextFragmentAbsorber 是 Aspose.PDF FOSS 中用于 Python 的类。

Absorber,用于从 SimplePdf 实例中提取文本片段。

此类提供 5 个方法,用于在 Python 程序中处理 TextFragmentAbsorber 对象。可用方法包括:__init__、apply_for_all_fragments、remove_all_text、reset、visit。在安装 Aspose.PDF FOSS for Python 包后,所有公共成员对任何 Python 应用程序均可访问。属性:fragments。

属性

名称类型访问描述
fragmentslist[TextFragment]读取获取片段。

方法

签名描述
__init__()Calls init 在此 TextFragmentAbsorber 实例上。
reset()清除已收集的碎片。
visit(pdf: SimplePdf)使用先进的 ContentStreamParser 收集文本碎片。
remove_all_text(pdf: SimplePdf)通过清除页面内容来删除 PDF 中所有可见文本。
apply_for_all_fragments(action)对所有片段应用函数。

另请参阅

 中文