Conversion options are parameters that determine the content, structure, and appearance of the HTML output. For example, you can specify:
You can set the conversion options either in the API or in the template files. Regardless of the method used to set the options, the values are ultimately passed to the API and used to populate the following
The conversion options are described in HTML Export API Structures.
Use the following functions to set conversion options:
HTML Export includes templates in the form of initialization files (.ini
). The templates provide a quick and easy way to modify the conversion options without programming at the API level. However, the template files do not give you complete control of the conversion process. To control some features, you must use the API directly.
You can use a text editor to customize the template files. For example, to change the output character set from the default KVCS_UNKNOWN
to KVCS_SJIS
in the default.ini
template, make the following change shown in bold:
[KVHTMLOptionsEx] OutputCharSet=KVCS_SJIS bForceOutputCharSet=TRUE
To create valid HTML, a template file must define at least two structures: KVHTMLTemplateEx
and KVHTMLOptionsEx
An application must then read the template file and write the data to the appropriate Export structures. In the sample program htmlini
, a template file is supplied as a command-line argument
The characteristics of some of the template files are demonstrated in the HTML Export Getting Started page. The Getting Started page, named htmstart.html
, is in the directory install\htmlexport\docs
, where install
is the path name of the Export installation directory. It compares the output generated using a set of sample documents and the template files. The source documents used in the page are in the directory install\testdocs
.
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 ) |
|
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 ) |
|
Hebrew (bidi_hebrew.ini ) |
|
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.
|
Multiple files with three frames (logotoc.ini ) |
|
No frills (nofrills.ini ) |
|
PDF bookmarks in a frame (pdfframe.ini ) |
This template is optimized to display PDF bookmarks in a separate frame.
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.
|
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 ( See Map Styles. |
UNIX web server (defunix.ini ) |
|
|