Converting .hlp files
Explains how to convert windows help files from the old .hlp format to
the newer HTMLHELP format (.chm) by using the winhelpcgi program.
The .chm (htmlhelp) file format introducted with windows 98 has
obsoleted the older .hlp (winhelp) file format for windows help
authoring. However there are still a lot of applications using the
older formatz for various reasons. One of the problems involved with
the transition is the fact that after converting an existing source
code for a .hlp file into a sourcecode for a .chm file a lot of details
have to be reworked since the converter program shipped by microsoft
with their Html Help Workshop is of rather limited quality.
We already addressed some of the problems involved with our older
HTMLHELP tools which post-process the files created by Html Help
Workshop to enhance their quality.
In winhelpcgi we have
implemented a much better technology for the conversion of existing
.hlp projects to .chm. It contains a technology we call tab-emulation
to emulate the tabs missing in html publishing by using nested tables.
It also uses CSS style sheets to represent the right formatting. In the
end the resulting HTML files are of much higher quality than the ones
created by by Microsoft Html Help Workshop.
Winhelpcgi creates a CHM sourcecode that can either be compiled using
Microsofts Html Workshop or be viewed by packing it with zip into a .htb file and viewing it with
help browser. Our chmviewer application
should be fine.
- Our winhelpcgi.cgi
package in version 1.0rc1 or newer for your operating system.
- Some "tar" program. GNU gnu
"tar" is fine. I think some kind of tar is always installed on all
current operating systems except Window$.
- Microsoft Html Workshop running on some Windows PC to compile the
- Copy the .HLP file and the .CNT file (if you have one) into the
directory where you installed winhelpcgi.cgi
- Change directory to this directory
- Start winhelpcgi with parameter --tar and the relative filename
of the .hlp file to convert.
- Redirect output of winhelpcgi.cgi
--tar to the tar program
to extract what you need.
# Instal winhelpcgi. Here for debian
apt-get install winhelpcgi libwmf
# Copy help file
cp -p myfile.hlp myfile.cnt /usr/lib/cgi-bin/
# Change directory
# Convert file
./winhelpcgi.cgi --tar myfile.hlp | tar -C /tmp --extract --verbose
This will create /tmp/myfile.hlp/
directory with a lot of subdirectories.