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 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.
Convert Documents to HTML by Using the Template Wizard
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\inidirectory. 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.
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:
-
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.jaris used to display a expandable table of contents. JVTree for more information onJVTree.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 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
bUseDocumentFontInfoUse font face attributes in the document
bSupportFontFaceSet font size relative to base font size
bDisplayRelativeFontSizeSupport user font size mapping
bSupportUserFontSizeMappingFontSizeMapEmit
<td>$nbsp;</td>for empty cellsbNbspEmptyCellsSupport "col=x" HTML parameter
bSupportRFC1942_colsConvert tabs to tables
bTabsToTablesTable Border
SATableBorderTable Cell Width
nTableBorderWidthOutput Language ID
OutputLanguageIDStyle Sheet Type
eStyleSheetTypeReplace Character
cReplaceCharRedact Character
cRedactWord Processing tab
Minimum length of paragraph
minParaLenMaximum length of paragraph
maxParaLenMinimum font size
fontSizeMinMaximum font size
fontSizeMaxRequired space before paragraph
mSpaceBeforeRequired space after paragraph
mSpaceAfterMust be bold
bMustBeBoldMust be italic
bMustBeItalicMust be underlined
bMustBeUnderlinedCan be non-zero indent
bNonZeroIndentCannot contain tab
bNoTabsCannot contain two or more spaces
bNoMultiSpacesHeading Create Options
headingCreateTypeForce source character set
bForceSrcCharSetSource Character Set
eSrcCharSetForce output character set
bForceOutputCharSetOutput Character Set
OutputCharSetSpreadsheet tab
Support column width
bSupportColumnWidthGenerate column headings
bSupportColumnHeadingsGenerate row headings
bSupportRowHeadingsSupport cell span
bSupportCellSpanSupport row span
bSupportRowSpanRemove empty columns
bRemoveEmptyColumnsEnable empty rows
bEnableEmptyRowsSpecify maximum rows per table
nRowsBeforeSplitPresentation/Image tab
Output any raster images to the following format
OutputRasterGraphicTypeOutput any vector images to the following format
OutputVectorGraphicTypeResolution of output image in x direction
cxVectorToRasterXResResolution of output image in y direction
cyVectorToRasterYResOutput presentation graphics as text and images
bRasterizeFilesNo pictures
Compression quality
nCompressionQualityParagraph Styles tab
Style Name
StyleNameMarkUpStart
MarkUpStartMarkUpEnd
MarkUpEndHeading 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) -
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.