TextAbsorber Constructor (TextExtractionOptions)
Initializes a new instance of the TextAbsorber with extraction options.

Namespace: Aspose.Pdf.Text
Assembly: Aspose.PDF (in Aspose.PDF.dll) Version: 20.6
Syntax
public TextAbsorber(
	TextExtractionOptions extractionOptions
)

Parameters

extractionOptions
Type: Aspose.Pdf.TextTextExtractionOptions
Text extraction options
Remarks
Performs text extraction and provides access to the extracted text via Text object.
Examples
The example demonstrates how to extract text from all pages of the PDF document.
C#
// open document
Document doc = new Document(inFile);

// create TextAbsorber object to extract text with formatting
TextAbsorber absorber = new TextAbsorber(new TextExtractionOptions(TextExtractionOptions.TextFormattingMode.Pure));

// accept the absorber for all document's pages
doc.Pages.Accept(absorber);

// get the extracted text
string extractedText = absorber.Text;
See Also