Converting chm files to html files under Linux

Quite a few ebooks are starting to show up as chm (Microsoft help) files. If you don't use Windows as your main platform that can be a nuisance. Luckily there is a nice simple library to convert chm files to html files under Linux: chmlib. Unfortunately the Fedora packages do not include the example binaries needed to convert the files. To convert these files, download the source chmlib package from http://www.jedrea.com/chmlib/ then

tar xvzf chmlib-0.39.tar.gz 
cd chmlib-0.39
./configure --enable-examples
make
sudo make install
cd src/

then

./extract_chmLib <chmfile> <outdir>

where <chmfile> is the name of the chm file and <outdir> is the name of the folder to put the extracted files. Within the extracted files will be a folder that contains all the html files.

Note that the generated index.html is not terribly useful. I find it convenient to change the name of index.html to links.html and copy the toc.html file to the index.html. This way when looking at the folder as a web page the table of contents shows up as the first page.

Reply

The content of this field is kept private and will not be shown publicly.
Captcha
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Copy the characters (respecting upper/lower case) from the image.