TextFragmentAbsorber

TextFragmentAbsorber

Overview

TextFragmentAbsorber is a class in Aspose.PDF FOSS for Python.

Absorber that extracts text fragments from a SimplePdf instance.

This class provides 5 methods for working with TextFragmentAbsorber objects in Python programs. Available methods include: __init__, apply_for_all_fragments, remove_all_text, reset, visit. All public members are accessible to any Python application after installing the Aspose.PDF FOSS for Python package. Properties: fragments.

Properties

NameTypeAccessDescription
fragmentslist[TextFragment]ReadGets the fragments.

Methods

SignatureDescription
__init__()Calls init on this TextFragmentAbsorber instance.
reset()Clear collected fragments.
visit(pdf: SimplePdf)Collect text fragments using the sophisticated ContentStreamParser.
remove_all_text(pdf: SimplePdf)Remove all visible text from PDF by clearing page contents.
apply_for_all_fragments(action)Apply a function to all fragments.

See Also