File Content Extraction 25.4
Filter SDK C Programming Guide

# Extract Subfiles

To filter all files in a container file, you must open the container and extract its subfiles by using the File Extraction API. The extraction process is done repeatedly until all subfiles are extracted and exposed for filtering. After a subfile is extracted, you can call Filter API functions to filter the file.

If you want to filter a container file and its subfiles to a single file, you must extract all files from the container, filter the files, and then append each filtered output file to its parent.

To extract subfiles

1. Call fpGetExtractInterface() and pass in the session that you initialized using fpInit(), and a pointer to a KVExtractInterface structure.

2. Declare the input stream or file name in the KVOpenFileArg structure.

3. Open the source file by calling fpOpenFile() and passing the `KVOpenFileArg` structure. This call defines the parameters necessary to open a file for extraction.

4. Determine whether the source file is a container file (that is, whether it contains subfiles) by calling fpGetMainFileInfo().

5. If the call to `fpGetMainFileInfo()` determined that the source file is a container file, proceed to step 6; otherwise, filter the file.

6. Determine whether the subfile is itself a container (that is, whether it contains subfiles) by calling fpGetSubFileInfo().

7. Extract the subfile by calling fpExtractSubFile().

8. If the call to `fpGetSubFileInfo()` determined that the subfile is a container file, repeat step 2 through step 7 until all subfiles are extracted and the lowest level of subfiles is reached; otherwise, filter the file.

Copyright 1997-2025 Open Text
Version 25.4 | Last updated October 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.4

Topic Title: Extract Subfiles