File Content Extraction 26.2
HTML Export SDK Java Programming Guide

# Extract Subfiles

To access all files in a container file, the container must be opened and its subfiles extracted to either a file or a stream. The extraction process is done repeatedly until all subfiles are extracted and exposed for conversion. After a subfile is extracted, you can call Export API methods to convert the data.

To extract subfiles

1. Open the source file by calling the `extOpenDocument` method. This call defines the parameters necessary to open a file for extraction.

2. Determine whether the main file is a container file (contains subfiles) by calling the `extGetMainFileInfo()` method.

3. If the call to `extGetMainFileInfo()` determined the source file is a container file, proceed to Step 4; otherwise, convert the file.

4. Determine whether the subfile is itself a container (contains subfiles) by calling the `extGetSubFileInfo` method.

5. Extract the subfile by calling the `extExtractSubFile` method.

6. If the call to `extGetSubFileInfo` determined the subfile is a container file, repeat Step 1 through Step 5 until all subfiles are extracted and the lowest level of subfiles is reached; otherwise, convert the file.

Copyright 1997-2026 Open Text
Version 26.2 | Last updated April 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.2

Topic Title: Extract Subfiles