# HTML Export Reference Implementation

The KeyView 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 Java 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 Java API, which provides much greater flexibility.

The library uses partition information provided by KeyView 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 implementation for the library is in `javaapi/libkvhtmlexport/src/`.

The `kvhtmlexport` sample program uses the library to convert documents to HTML. The source code is provided in `javaapi/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 the environment variables KV_SAMPLE_PROGRAM_LICENSE_ORGANIZATION and KV_SAMPLE_PROGRAM_LICENSE_KEY are set, their values are used instead of the trial license. This allows you to continue to use the program after the embedded trial license has expired, and also to test or troubleshoot with your actual license.

_FT_HTML5_bannerTitle.htm