# HtmlTest

This program converts an input document to an output document and allows you to specify options in the command line. The command-line options are listed in Options for the HTMLTest Sample Program. This program demonstrates most of the methods available in the Java API.

NOTE: This sample program demonstrates how to export from a `java.io.InputStream` object. However, Micro Focus recommends that you implement a `com.verity.api.SeekableInputStream` and pass this into KeyView instead. Micro Focus recommends this option because it allows KeyView to seek in the file, only reading the parts it needs to read. For more information, see Input/Output Operations.

To run HtmlTest

1. Add the location of the `javaapi\KeyView.jar` file, the `javaapi\sample` directory, and the Export `bin` directory to the `CLASSPATH` environment variable.

2. Run the program as follows:

       java -Djava.library.path=bin_directory HtmlTest [options] bin_directory inifile inputfile outputfile

   where:

   - `bin_directory` is the path to the Export `bin` directory.
   - `options` is one or more of the options listed in Options for the HTMLTest Sample Program.
   - `inifile` is the full path and file name of a template file. See Explore Conversion Options with the Sample Programs.
   - `inputfile` is the path and file name of the source file.
   - `outputfile` is the path and file name of the generated file.

   If a path is not specified, the file is output to the current directory.

Options for the HTMLTest Sample Program

Option | Description
--- | ---
`-is` | This option sets the input as a stream. The default is file.
`-os` | This option sets the output as a stream. The default is file.
`-oop` | This option runs Export as a separate process. See Convert Files Out of Process. The .NET version of the sample program does not support this option.
`-oopksa` | This option keeps a Servant process active after the Export out-of-process session is terminated. If the Servant remains active, subsequent conversion requests are processed more quickly because the Servant is already prepared to receive data. The .NET version of the sample program does not support this option.
`-x` `xmlconfigfile` | This option converts an XML file using customized extraction settings defined in the `kvxconfig.ini` file. If you do not enter the full path to the configuration 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.
`-z` `tempdirectory` | This option specifies a temporary directory in which temporary files generated by the conversion process are stored.
`-docformat` `formatfile` | This option extracts the file format information and writes it to a file. `formatfile` is the name of the file to which the format information is written.
`-summary` `summaryfile` | This option extracts the metadata and writes it to a file. `summaryfile` is the name of the file to which the metadata is written. See Extract Metadata.
`-list` `listfile` | This option displays a list of the files that are automatically generated during the conversion. `listfile` is the name of the file to which the file list is written.
`-hifipdf` | This option specifies the type of reader used to convert PDF documents. In HTML Export, PDF documents are converted using either the graphic-based PDF reader, named `kppdfrdr`, or the basic PDF reader, named `pdfsr`. See Convert PDF Files. By default, the basic reader (`pdfsr`) is used to convert PDF documents.
`-suptocim` | If you set this option, bookmarks in a PDF file are not used to generate a table of contents in the HTML output. By default, the table of contents is generated from "bookmarks" within the PDF file. See Convert PDF Files.
`-textrotate` | This option specifies that rotated text should be displayed at the bottom of a page on which it appears. By default, rotated text in a file is displayed in its original position, at the original font size, and at 0 degrees rotation. The text is not rotated in the HTML output because text rotation is not supported by HTML. See Convert Rotated Text. Currently, this configuration option only applies to PDF files.
`-pdflorder` `orderFlag` | This option specifies that PDF files are output in a logical reading order. The `orderFlag` parameter is one of the following: `ltr`—left-to-right paragraph direction. `rtl`—right-to-left paragraph direction. `auto`—The PDF reader determines the paragraph direction (left-to-right or right-to-left) for each PDF page, and then sets the direction accordingly. `raw`—Unstructured paragraph flow. See Convert PDF Files to a Logical Reading Order.
`-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.
`-hlcs` `charset` | This option specifies the character set of the highlighted search terms in the HTML output.
`-hlig` | This option specifies that the text search is case insensitive. This option can be used only when the target character set for the highlighted search term is `KVCS_1252`.
`-rm` | If you set this option, text and graphics that were deleted from a document with revision tracking enabled are converted, and revision tracking information is included in the HTML output. See Convert Revision Tracking Information.
`-dsh` | This option specifies that soft hyphens in PDF files are deleted from the converted output. See Control Hyphenation.

_FT_HTML5_bannerTitle.htm