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 Explore Conversion Options with the Sample Programs 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.
To convert a document to HTML
Launch HTML Export Template Wizard.
Click Choose Template.
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.
Select an input file by using the browse button next to the Input File field.
Click Convert to HTML to produce an HTML file of the source document.
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.
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:
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
).
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.
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 Explore Conversion Options with the Sample Programs.
To modify the default options specified in the Wizard
Click Modify Template.
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 |
|
Use font information in the original document |
|
Use font face attributes in the document |
|
Set font size relative to base font size |
|
Support user font size mapping |
|
|
|
Emit |
|
Support "col=x" HTML parameter |
|
Convert tabs to tables |
|
Table Border |
|
Table Cell Width |
|
Output Language ID |
|
Style Sheet Type |
|
Replace Character |
|
Redact Character |
|
Word Processing tab |
|
Minimum length of paragraph |
|
Maximum length of paragraph |
|
Minimum font size |
|
Maximum font size |
|
Required space before paragraph |
|
Required space after paragraph |
|
Must be bold |
|
Must be italic |
|
Must be underlined |
|
Can be non-zero indent |
|
Cannot contain tab |
|
Cannot contain two or more spaces |
|
Heading Create Options |
|
Force source character set |
|
Source Character Set |
|
Force output character set |
|
Output Character Set |
|
Spreadsheet tab |
|
Support column width |
|
Generate column headings |
|
Generate row headings |
|
Support cell span |
|
Support row span |
|
Remove empty columns |
|
Enable empty rows |
|
Specify maximum rows per table |
|
Presentation/Image tab |
|
Output any raster images to the following format |
|
Output any vector images to the following format |
|
Resolution of output image in x direction |
|
Resolution of output image in y direction |
|
Output presentation graphics as text and images |
|
No pictures |
|
Compression quality |
|
Paragraph Styles tab |
|
Style Name |
|
MarkUpStart |
|
MarkUpEnd |
|
Heading 1 |
|
Heading 2 |
|
Heading 3 |
|
Heading 4 |
|
Heading 5 |
|
Heading 6 |
|
PRE |
|
Redact |
|
Order List |
|
Unordered List |
|
Delete Content |
|
On Consecutive Paragraphs |
|
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.
To create a new template that preserves any modifications that have been made, click Save Template as Ini File.