File Content Extraction 26.1
HTML Export SDK C Programming Guide

# HTML Export Reference Implementation

The File Content Extraction Export SDK includes a reference implementation that demonstrates how to export documents to HTML. The reference implementation includes source code for a library named `libkvhtmlexport`, and a sample program named `kvhtmlexport`.

The `libkvhtmlexport` library is written in C++ and provides a simple interface to HTML Export. You can:

- use the library in your own product, if it provides the functionality you need.
- modify the library to provide the functionality you desire.
- look at the source code to help you learn how to use the C API, which provides much greater flexibility.

The library uses partition information provided by File Content Extraction to provide the following features out-of-the-box:

- A "print" view for word-processor documents. This creates a web page containing a representation of the original document, which is easy to read because it uses the correct page widths and margins.
- A "tabbed" view for spreadsheet files. This shows spreadsheets using a familiar tabbed interface, with one worksheet on each tab.
- A "list" view for presentations. This displays multiple slides, arranged in a vertical column one after another, on a single web page.
- A "full screen" view for presentations. This displays one slide at a time. You can navigate between slides using the arrow keys on your keyboard or the scroll wheel on your mouse.

When the reference implementation is used to export a file that contains subfiles, the subfiles are listed in a side panel.

The following image shows a Microsoft Word document that has been exported to HTML, being displayed in a web browser:

The following image shows a Microsoft Excel workbook that has been exported to HTML, being displayed in a web browser. Additional sheets can be viewed by clicking the tabs at the bottom of the window.

The interface for the library is in `htmlexport/libkvhtmlexport/include/libkvhtmlexport.h`, and the implementation is in `htmlexport/libkvhtmlexport/src/`. Building the reference implementation requires C++11.

The `kvhtmlexport` sample program uses the library to convert documents to HTML. The source code is provided in `htmlexport/libkvhtmlexport/sample/src/`. A compiled binary is also provided, in the `PLATFORM/bin` folder, so that you can try it without having to build it yourself. For more information, see kvhtmlexport.

NOTE: The compiled binary for `kvhtmlexport` has an embedded trial license, which expires approximately five months after release. If you set the environment variable `KV_SAMPLE_PROGRAM_LICENSE_FROM_FILEPATH` to a file path, the sample program reads your license from the specified file. This allows you to use the program after the embedded trial license has expired, and to test or troubleshoot with your own license.

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: HTML Export Reference Implementation