File Content Extraction 26.1
Filter SDK C Programming Guide

# fpFilterStream()

This function filters text from an input stream to an output buffer.

DEPRECATED: The `fpFilterStream()` function is deprecated in KeyView 23.2.0 and later. OpenText recommends that you create a `KVDocument` to represent each document, and use fpFilter() instead.

This function is still available for existing implementations, but it might be incompatible with new functionality and might be removed in future.

## Syntax

    KVErrorCode pascal fpFilterStream(
        KVFilterSession  session,
        void            *pStreamContext
        KVFilterOutput  *pFilterOutput,
        KVSummaryInfoEx *pSummaryInfo);

## Arguments

`session` | A Filter session that you initialized by calling fpInit().
`pStreamContext` | A pointer returned from fpOpenStream() or fpOpenStreamEx2().
`pFilterOutput` | A pointer to the KVFilterOutput structure. This structure defines the output buffer.
`pSummaryInfo` | This argument is reserved. It must be `NULL`.

## Returns

- If the call is successful, the return value is `KVError_Success`.
- If the call is not successful, the return value is an error code that indicates the problem.

## Discussion

- This function processes data in chunks. To return the entire output stream, you must call this function repeatedly until the entire output buffer is processed, that is, until the following condition occurs:

      pFilterOutput-> cbText == 0

- After each call to `fpFilterStream` that returns `KVError_Success`, after the data in the `pFilterOutput` argument is no longer required, call fpFreeFilterOutput to free the memory allocated by this function.

- If `fpFilterStream()` returns an error, filtering failed and you must not call `fpFilterStream()` again with this `pStreamContext` because it will not obtain any more text. Additionally, you must not call fpFreeFilterOutput, because `pFilterOutput` will not have been updated with valid filter output.

- When filtering out-of-process in streaming mode (see Configure Legacy Pipe-Streaming), you must finish filtering the stream before using any interface function other than `fpFilterStream()` or fpCloseStream() with the same context pointer. Filtering can be completed at any time by calling fpCloseStream() or by calling `fpFilterStream()` until `pFilterOutput->cbText == 0`.

## Example

    error = (int)(*pFilterInterface->fpFilterStream)( pFilter, pStream, &filterOut, NULL );

Copyright 1997-2025 Open Text
Version 26.1 | Last updated January 2026

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 26.1

Topic Title: fpFilterStream()