Open topic with navigation

# htmlini

The `htmlini` sample program is used in conjunction with template files to produce HTML documents. For more information on template files, see Set Conversion Options by Using the Template Files. Sample template files are in the directory `install\htmlexport\programs\ini`. You can use this sample program on Windows and UNIX platforms.

To run `htmlini`, type the following at the command line:

    htmlini [options] inifile inputfile outputfile

where:

`options` is one or more of the options listed in Options for htmlini.

`inifile` is the full path and file name of a template file.

`inputfile` is the full path and file name of the source document.

`outputfile` is the full path and file name of the first HTML output file.

The following options are available.

Options for htmlini

Option | Description
--- | ---
`-c` `css_filename` | This option writes Cascading Style Sheet (CSS) information to an external file. See Use Style Sheets with htmlini.
`-x` `xmlconfig_path` | This option converts an XML file by using customized element extraction settings defined in the `kvxconfig.ini` file. If you do not enter the full path to the template file, the program looks for the file in the current working directory (`install\OS\bin`, where `install` is the path name of the Export installation directory and `OS` is the name of the operating system). See Convert XML Files.
`-hl` `term term term` | This option specifies the text string or strings that are found and highlighted in the HTML output. You can specify a maximum of three terms. See Search and Highlight Terms.
`-hc` `charset` | This option specifies the character set of the highlighted search terms in the HTML output.
`-hi` | This option specifies that the text search is case insensitive. You can use this option only when the target character set for the highlighted search term is `KVCS_1252`.
`-rm` | This opton converts text and graphics that were deleted from a document with revision tracking enabled, and includes revision information in the HTML output. See Include Revision Information. This option uses the following hard-coded defaults: the revision title includes the text string "`inserted:`" for `<ins>` tags and "`deleted:`" for `<del>` tags. the revision title includes the reviewer name, date, and time. defines two HTML styles used to highlight reviewers' edits. creates a revision summary file.
`-bp` | This option prevents graphics from being converted and generates image tags with empty `src` attributes. This makes the conversion faster, and maintains the text flow of the original document, because placeholders are generated for the graphics.
`-oop` | This option runs the conversion out of process.
`-fl` | This option prints a list of converted files in the console.
`-pi` `ButtonName` | This option enables a toggle button in exported PDF documents that you can click to show or hide invisible text. `ButtonName` determines the name of the toggle button. See Toggle Invisible Text.
`-ov` `OpacityValue` | This option specifies the opacity of invisible text in exported PDF documents. `OpacityValue` is an integer from 0 (invisible) to 100 (fully visible). The default is 0. See Specify Opacity of Invisible Text.

If the HTML file is output to a directory other than `programs\tempout`, you must update the HTML markup so that the browser can find images used by the templates (such as backgrounds or corporate logos) and the style sheet. The markup contains relative references to the image files (`..\images`).

## Use Style Sheets with htmlini

The `htmlini` sample program has an option that allows Cascading Style Sheet (CSS) information to be written to an external file. This makes the HTML output document significantly smaller and enables you to use the same style sheet for many conversions. If the style sheet does not exist or if it is empty, it is created.

To write CSS information to an external file:

1. In the template file, set `eStyleSheetType` to `CSS_TOFILE`. This specifies that the formatting data is stored in a CSS file.

2. In the template file, use the `$STYLESHEET``` token to specify the URL of the style sheet in the HTML output. The external CSS file is referenced in the output HTML by a `LINK` statement of the form:

       <LINK rel="STYLESHEET" href="CSS_file" type="text/css">

3. At the command prompt, type:

       htmlini -c stylesheetname inifile inputfile outputfile

   where `stylesheetname` is the path and file name of the CSS file.

© Copyright 2006-2019 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm