File Content Extraction 26.1
HTML Export SDK C Programming Guide

# Set Conversion Options

Conversion options are parameters that determine the content, structure, and appearance of the HTML output. For example, you can specify:

- the markup inserted at the beginning and end of specific HTML blocks
- whether a heading is included in the table of contents
- the output character set
- the resolution at which graphics are converted.

## Set Conversion Options by Using the API

You set conversion options by modifying the following data structures:

- KVHTMLTemplateEx
- KVHTMLOptionsEx
- KVHTMLHeadingInfo
- KVHTMLTOCOptions

These data structures are then passed into functions in the Export API, such as:

- fpConvertStream()
- KVHTMLConvertFile()
- KVHTMLStartOOPSession()

## Explore Conversion Options with the Sample Programs

To make it easier to explore the conversion options, HTML Export includes some sample configurations in the form of initialization (`.ini`) files. These are read by the htmlini sample program (you must supply the `.ini` file path as a command-line argument). The sample program reads the configuration, and converts your input file into HTML using the options you set, by passing them into the API. This lets you try out conversion options without programming.

You can use a text editor to customize the configuration files. In general, a section name refers to the structure containing an option, and a parameter name matches an element of that structure. For example:

    [KVHTMLOptionsEx]
    OutputCharSet=KVCS_SJIS
    bForceOutputCharSet=TRUE

This sets the `OutputCharSet` and `bForceOutputCharSet` elements in the KVHTMLOptionsEx structure.

NOTE: To create valid HTML, an initialization file must define at least two structures: `KVHTMLTemplateEx` and `KVHTMLOptionsEx`. Additionally, if you enter markup in the template files that is not compliant with HTML standards, HTML Export inserts the markup into the output file unchanged. This might result in a malformed HTML file.

### Templates

The template files for the C API implementation are in the directory `install\htmlexport\programs\ini`, where `install` is the path name of the Export installation directory. The following templates are provided:

Template | Description
--- | ---
Arabic (`bidi_arabic.ini`) | Based on the default template (`default.ini`). The Arabic character set is defined in the template. `<dir="rtl"`> added to the Body tag to indicate that the text is read from right to left.
Cascading style sheet (`css_ex.ini`) | This template writes style sheet information to an external Cascading Style Sheet (CSS) file or reads the information from an existing CSS file. This makes the HTML output significantly smaller because the information is not stored within the output file. It also allows you to use the same style sheet for many conversions. See Use Style Sheets and Use Style Sheets with htmlini for more information on using an external CSS file.
Default (`default.ini`) | Segments word processing documents, spreadsheets, and presentations into multiple files according to the document's heading levels. Creates two frames. The table of contents (based on the source document's heading levels and page breaks) appears in the left frame. The document contents associated with the table of contents entry selected in the left frame appears in the right frame. Inserts Previous and Next buttons at the end of each block. Supports URLs. Supports headers, footers, footnotes, and endnotes. Converts graphics to JPEG with the original size preserved. Outputs vector graphics and presentation slides in SVG format - see Vector Graphics Output.
Hebrew (`bidi_hebrew.ini`) | Based on the default template (`default.ini`). The Hebrew character set is defined in the template. `<dir="rtl">` added to the Body tag to indicate that text is read from right to left.
Low bandwidth (`lowband.ini`) | This template is useful when you need to provide information to a mobile workforce that might not always have access to fast connections. Creates text-only HTML. Suppresses the source document's embedded graphics.
Multiple files with three frames (`logotoc.ini`) | Segments word processing documents, spreadsheets, and presentations into multiple files according to the document's heading levels. Creates three frames. A corporate logo is displayed in the top left frame. The table of contents (based on source document heading levels and page breaks) appears in the bottom left frame, and the HTML files appear in the right frame. Inserts Previous and Next links at the end of each block. Supports URLs.
No frills (`nofrills.ini`) | Creates a single HTML file. Supports URLs. Maintains the source document's fonts and styles. Does not create a table of contents. Does not list the source document's metadata.
PDF bookmarks in a frame (`pdfframe.ini`) | This template is optimized to display PDF bookmarks in a separate frame. Segments a PDF file into two HTML files; one contains the table of contents (based on the bookmarks in the PDF file), and the other contains the document text. Creates two frames. The table of contents appears in the left frame, and the document appears in the right frame. Forces the output character set to UTF-8. Does not insert Back to Top, Previous, or Next links. See Convert PDF Files for more information on generating a table of contents from bookmarks in a PDF file.
Single file with table of contents (`onefiletoc.ini`) | This template is useful when you want to print the document. Creates a single HTML file. Creates a table of contents at the top of the HTML document. Uses worksheet names to create the table of contents entries for spreadsheets. If worksheet names do not exist in the source document, "Sheet1," "Sheet2," "Sheet3," and so on are used. Uses slide titles to create the table of contents entries for presentations. If slide titles do not exist in the source document, "slide 1," "slide 2," "slide 3," and so on are used. Lists all metadata (Title, Subject, Author, Comments, and so on). Converts graphics to JPEG with the original resolution preserved. Outputs vector graphics and presentation slides in SVG format - see Vector Graphics Output.
Style mapping (`wordstyle.ini`) | This template demonstrates how to map paragraph and character styles in a word processing document to arbitrary markup (including CSS, XML, or HTML). Using style mapping, you can use external Cascading Style Sheet (CSS) files to define styles used in the HTML, alter the structure of a document, delete content, or replace content with a specified character (`redact`). See Map Styles.
UNIX web server (`defunix.ini`) | Based on the default template (`default.ini`). Outputs vector graphics in SVG format - see Vector Graphics Output.

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: Set Conversion Options