There will undoubtedly come a time in your life when it becomes necessary for you to have a look at a .chm file — a Microsoft Windows compiled HTML help document. It’s happened to me multiple times. Nearly all Windows programs use the chm format for their documentation, and some eBooks are chm, too.
But these are Windows help files. What to do if you exclusively run Linux? . . . Fire up KchmViewer!
KchmViewer is a very handy and easy-to-use application, with a look and feel almost identical to that of Microsoft’s Help program. As the ‘K’ in its name signifies, KchmViewer was designed for the KDE environment, but as long as you have the Qt libraries installed, it will work with any windowing manager.
Only the source files are available from the official website, but KchmViewer is provided in binary form by several distributions. Of course, if you want the latest version, compiling is the way to go, and it’s not that hard, either. This newest version provides support for KDE4, so it is dependant on the
qt4-dev-tools packages (names may be slightly different for your distro), and on
libchm-dev. This is a Qt program, so instead of running a
./configure script to generate your Makefile, you run either
qmake (if you don’t use KDE4) or
cmake (if you do); followed, of course, by
make. Those using KDE4 will need to then run
make install, but the rest of us can run it from the kchmviewer-4.0beta3/bin directory, or copy it manually to some handier location.
When KchmViewer is run, it may, for a very brief time, seem to have crashed. None of the buttons can be pressed, the menu is unresponsive, etc. However, just wait a little bit — the program is merely in the process of waking up! After a couple seconds, a file browsing dialog will pop up, and operation can begin. Select the chm file you want to view, and then click Open.
The window is divided into two panes: the left-hand one displays navigation options, and the one on the right shows the current page. The left side has four tabs, respectively containing a tree view of the file’s page hierarchy, an alphabetical index of all the pages in the file (sometimes takes a long time to generate; only use if necessary), a search tool, and a list of bookmarked pages: very similar to the Windows Help program. The panel to the right also supports tabs, allowing you to have multiple pages open simultaneously, and to switch quickly between them — a feature that, I think, Windows’ program does not have. To utilize it, click the small button marked ‘+’ at the upper left of the right panel. This will open a new tab, in which you can open any page you like, by clicking the appropriate link in the Contents.
One nice feature is the persistent nature of the program. KchmViewer remembers the pages and tabs you had open the last time you viewed a document, and restores them when you open that file again. You can also, of course, bookmark any number of pages in a chm file. Then, when you want to come back to a subject months later, you can merely click on the bookmark, and continue from the exact point on the page where you left off.
In addition to all this, KchmViewer allows you to print out pages from your chms, view the HTML source for them, and even extract a help document into its component HTML files. It also has a great emphasis on accessibility, with complete support for non-English languages, and easily resizable text, for people afflicted with poor eyesight or fuzzy CRT screens. No documentation is included, nor is really necessary, this being a fairly intuitive program. If any is eventually written, though, it would be neat if it were in chm format!
While most Linux users won’t often need to access chm files, for those that do, KchmViewer is an excellent choice. It does have a few quirks that take some getting used to, but, overall, this is a very useful program.