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. The program is available in J# (HtmlTest.exe) for .NET and Java (

To run HtmlTest

  1. For the Java version of the program, add the location of the javaapi\KeyView.jar file, the javaapi\sample directory, and the Export bin directory to the CLASSPATH environment variable.

  2. For the Java version of the program, type the following:

    java -Djava.library.path=bin_directory HtmlTest [options] bin_directoryinifile inputfileoutputfile

    For the .NET version of the program (HtmlTestJ.exe), type:

    HtmlTestJExport [options] bin_directoryinifileinput_fileoutput_file


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

Options for the HTMLTest Sample Program



-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.

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.


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.

On Windows systems, there is a 64 K size limit to the temporary directory. After the limit is reached, you must either create a new directory or delete the contents of the existing directory; otherwise, you might receive an error message.

-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 to Raster Images. 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. Convert PDF Files.

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. 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.

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. 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.