KeyView 23.2

# XmlTest

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

NOTE: This sample program demonstrates how to export from a `java.io.InputStream` object. However, OpenText recommends that you implement a `com.verity.api.SeekableInputStream` and pass this into KeyView instead. OpenText 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 XmlTest

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

2. Type the following:

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

   where:

   - `bin_directory` is the path to the Export `bin` directory.
   - `options` is one or more of the options listed in Options for the XMLTest 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 XMLTest 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.
   `-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.
   `-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 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 Revision Tracking Information.
   `-z` `tempdirectory` | This option specifies a temporary directory in which temporary files generated by the conversion process are stored.
   `-style` `stylefile` | This option reads style sheet information from an existing style sheet file, or writes the information to an external CSS file.
   `-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.
   `-supim` | This option specifies that XML output includes verbose markup, but no images. If you do not set this option, embedded images in a document are regenerated as separate files and in the output directory.
   `-enpos` | This option specifies that a position element is included in the markup for PDF documents. The position element defines the absolute position of the text relative to the bottom left corner of the page, and includes additional information such as font and color.
   -`disablezone` | This option disables the conversion of Microsoft Word bookmarks to zone elements (`<zone name ="xxx">`) in the output XML.
   -`suptocim` | If you set this option, bookmarks in a PDF file are not converted to simple XLinks in the XML output. By default, PDF bookmarks are converted to source and destination anchors.
   `-pdflorder` `orderFlag` | This option specifies that PDF files are output in a logical reading order. The parameter `orderFlag` 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.
   `-rm` | If you set this option, text and graphics that were deleted from a document with a revision tracking feature enabled are converted, and revision tracking information is included in the XML 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.

Copyright 1997-2023 Open Text
Version 23.2 | Last updated March 2023

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 swpdl.idoldocsfeedback@microfocus.com.

We appreciate your feedback!

Product: IDOL KeyView 23.2

Topic Title: XmlTest