Open topic with navigation

# Template Wizard

The Template Wizard is a Visual Basic program that provides an easy-to-use graphical user interface to the Export technology. It is an example of how to use most of the properties, methods, and events available in the COM Automation Server. See COM Interface Methods and Events and COM Interface Properties for more information on the properties and methods.

The Template Wizard converts documents based on the predefined templates. Several templates are supplied with HTML Export, and they can be customized to suit your needs. See Set Conversion Options by Using the Template Files for details on the template files.

NOTE: The Template Wizard requires a COM server to be registered. See Use the COM Implementation of the API.

You can use the Template Wizard to modify existing template files to create your own customized files, and to convert documents to HTML. However, the Template Wizard does not allow you to modify all structures in the template files. To control some display options, you might have to modify the template files directly or use the API.

## Convert Documents to HTML by Using the Template Wizard

To convert a document to HTML

1. Launch HTML Export Template Wizard.

2. Click Choose Template.

3. Select one of the templates listed in the Choose Template dialog box, or click the browse button to select another template file. The template files are located in the `programs\ini` directory. Click OK.

4. Select an input file by using the browse button next to the Input File field.

5. Click Convert to HTML to produce an HTML file of the source document.

6. Click View HTML to open the converted file in your browser. To specify which browser is used to view the converted HTML files, click Change Browser.

   When you change the default browser, the location of the browser's executable file is written to a file named `browser.wiz`. If the browser is not changed, the default browser is the Visual Basic web browser object\OCX.

## Change the Output Directory

By default, the output file is stored in the `programs\tempout` directory. To change this directory, click the browse button next to the Output Directory field and select a new directory.

If you change the default output directory, you must make the following modifications to the templates:

1. Update the HTML markup so that any images used by the templates (such as backgrounds or corporate logos) are found by the browser. The markup contains relative references to the image files (`..\images`).

2. Update the templates so that the Java applet (`JVTree.jar`) is found.

   NOTE: `JVTree.jar` is used to display a expandable table of contents. JVTree for more information on `JVTree.jar`.

To delete the HTML and image files created in the output directory, click Delete Created Output Files.

## Modify a Template in the Wizard

The Template Wizard provides limited control over the templates. You might wish to modify the template files directly in a text editor to provide maximum customization of the converted HTML. See Set Conversion Options by Using the Template Files.

To modify the default options specified in the Wizard

1. Click Modify Template.

2. Modify the properties in the Options dialog box. The template parameters associated with each option in the Options dialog box are listed below and are described in HTML Export API Structures.

   Wizard field | Template parameter
   --- | ---
   All Formats tab
   Use text color in the original document | `bUseDocumentColors`
   Use font information in the original document | `bUseDocumentFontInfo`
   Use font face attributes in the document | `bSupportFontFace`
   Set font size relative to base font size | `bDisplayRelativeFontSize`
   Support user font size mapping | `bSupportUserFontSizeMapping`
   User Font Size Map | `FontSizeMap`
   Emit `<td>$nbsp;</td>` for empty cells | `bNbspEmptyCells`
   Support "col=x" HTML parameter | `bSupportRFC1942_cols`
   Convert tabs to tables | `bTabsToTables`
   Table Border | `SATableBorder`
   Table Cell Width | `nTableBorderWidth`
   Output Language ID | `OutputLanguageID`
   Style Sheet Type | `eStyleSheetType`
   Replace Character | `cReplaceChar`
   Redact Character | `cRedact`
   Word Processing tab
   Minimum length of paragraph | `minParaLen`
   Maximum length of paragraph | `maxParaLen`
   Minimum font size | `fontSizeMin`
   Maximum font size | `fontSizeMax`
   Required space before paragraph | `mSpaceBefore`
   Required space after paragraph | `mSpaceAfter`
   Must be bold | `bMustBeBold`
   Must be italic | `bMustBeItalic`
   Must be underlined | `bMustBeUnderlined`
   Can be non-zero indent | `bNonZeroIndent`
   Cannot contain tab | `bNoTabs`
   Cannot contain two or more spaces | `bNoMultiSpaces`
   Heading Create Options | `headingCreateType`
   Force source character set | `bForceSrcCharSet`
   Source Character Set | `eSrcCharSet`
   Force output character set | `bForceOutputCharSet`
   Output Character Set | `OutputCharSet`
   Spreadsheet tab
   Support column width | `bSupportColumnWidth`
   Generate column headings | `bSupportColumnHeadings`
   Generate row headings | `bSupportRowHeadings`
   Support cell span | `bSupportCellSpan`
   Support row span | `bSupportRowSpan`
   Remove empty columns | `bRemoveEmptyColumns`
   Enable empty rows | `bEnableEmptyRows`
   Specify maximum rows per table | `nRowsBeforeSplit`
   Presentation/Image tab
   Output any raster images to the following format | `OutputRasterGraphicType`
   Output any vector images to the following format | `OutputVectorGraphicType`
   Resolution of output image in x direction | `cxVectorToRasterXRes`
   Resolution of output image in y direction | `cyVectorToRasterYRes`
   Output presentation graphics as text and images | `bRasterizeFiles`
   No pictures | `bNoPictures`
   Compression quality | `nCompressionQuality`
   Paragraph Styles tab
   Style Name | `StyleName`
   MarkUpStart | `MarkUpStart`
   MarkUpEnd | `MarkUpEnd`
   Heading 1 | `Flags=KVSTYLE_HEADING1` (see Flags for Defining Styles)
   Heading 2 | `Flags=KVSTYLE_HEADING2` (see Flags for Defining Styles)
   Heading 3 | `Flags=KVSTYLE_HEADING3` (see Flags for Defining Styles)
   Heading 4 | `Flags=KVSTYLE_HEADING4` (see Flags for Defining Styles)
   Heading 5 | `Flags=KVSTYLE_HEADING5` (see Flags for Defining Styles)
   Heading 6 | `Flags=KVSTYLE_HEADING6` (see Flags for Defining Styles)
   PRE | `Flags=KVSTYLE_PRE` (see Flags for Defining Styles)
   Redact | `Flags=KVSTYLE_REDACT` (see Flags for Defining Styles)
   Order List | `Flags=KVSTYLE_ORDERLIST` (see Flags for Defining Styles)
   Unordered List | `Flags=KVSTYLE_UNORDERLIST` (see Flags for Defining Styles)
   Delete Content | `Flags=KVSTYLE_DELETECONTENT` (see Flags for Defining Styles)
   On Consecutive Paragraphs | `Flags=ONCONSECUTIVEPARAGRAPHS` (see Flags for Defining Styles)

3. You can use the Paragraph Styles tab to map paragraph and character styles in any word processing document that contains styles (such as Microsoft Word, RTF, or Folio Flat File) to arbitrary markup.

4. To create a new template that preserves any modifications that have been made, click Save Template as Ini 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