WH2FO

Word HTML 2 Formatting Objects

SourceForge Logo

Executables

The following executable files are included in the distribution:

  • bin/WH2FO_x_y_z.jar - WH2FO Java code

Microsoft Windows Specific files

  • wh2foMSV.bat - batch file that call the MS virtual machine
  • wh2fo.bat - batch file that call the java virtual machine
  • setpath.bat - batch file that add the wh2fo jar into the java CLASSPATH

Unix Specific files

  • wh2fo.sh - unix script for wh2fo written by Simone Merli

How to run it using the MS Virtual Machine

For Microsoft Windows users it is possible to run the compiled code using a batch file that calls the MS Virtual Machine

The MS VM (jview.exe) is normally installed with IE 5.x and can execute java code without downloading a JRE

  • open a Shell (or a Dos session)
  • put the jar file inside the class path using setpath wh2fo-path
  • translator htm-file-name [options]

How to run it using the JRE

It is possible to execute the Java code directly on any OS.

The Java code must be executed from a Java 1.x runtime environment (JRE) as follows:

Windows users just use the wh2fo.bat : wh2fo htm-file-name [options]

All users:

  • open a Shell (or a Dos session)
  • put the jar file inside the class path
  • java wh2fo.apps.Translator htm-file-name [options]

How to run in the Linux/Unix Environment

For Linux/Unix users it is possible to run the compiled code using a shell script file that calls the java run-time engine (jdk1.1)

  1. run dosunix wh2fo.sh
  2. run chmod 744 wh2fo.sh
  3. ./wh2fo.sh htm-file-name [options]

Results

The application will automatically generate 3 files using the same name as the input file:

  1. a file for the content htm-file-name.xml
  2. a file for the stylesheet htm-file-name.xsl
  3. a file for the attributes (style-sets) htm-file-nameAtts.xsl

Execution options

The possible WH2FO execution options are:

  • /INFO - display the disclaimer
  • /TOC - creates the TOC into the PDF bookmarks (only with the FOP extensions)
  • /DEBUG - shows the parsing process (useful for the debug)

How to obtain the XSL-FO file

To create a XSL-FO file you must process the XML and XSL file using a XSLT processor, for instance you can use XT (by James Clark) that provides both a jar and a Windows executable