File Content Extraction 25.1
Filter SDK C++ Programming Guide

# Streaming Filtered Text

Sometimes, you might want to get filtered text in small chunks instead of all at once. This approach has the following advantages:

- You can process the output data in parallel with filtering the rest of the text. Parallel processing can minimize the time it takes to filter and process the text.
- You can choose to stop filtering when the application has all the text it needs, which can save valuable resources. This approach is called partial filtering.

You can use the `text` method on a `Document` object to obtain a `std::istream`, from which you can stream filtered text. File Content Extraction only processes as much of the document as it needs to output the text you read. For example:

Copy

    for(std::string line; std::getline(doc.text(), line);)
    {
        doSomething(line);
    }

Copyright 1997-2024 Open Text
Version 25.1 | Last updated January 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 25.1

Topic Title: Streaming Filtered Text