July 03, 2008

How-To: View and Convert CHM Help Files to PDF in Debian Lenny

View CHM files using Kchmviewer
CHM is a proprietary file format from Microsoft used for help files. You can view these files with Kchmviewer, which is quite a good application for KDE, offering a lot of options. To install it, just do the usual apt-get install kchmviewer as root.

Kchmviewer 3.1

You can configure font sizes, how it behaves, what engine to use for displaying the HTML files. You can add bookmarks or even see the HTML source for the currently viewing page. It also has an option to extract HTML files into a directory of your choice, breaking the whole CHM file into HTML files readable with a usual web browser.

Settings

The last stable version of KchmViewer is 3.1, and the development release at the time of writing is 4.0beta3.

Converting CHM to PDF using the chm2pdf tool
For converting the file to PDF, there is an open-source tool called chm2pdf included in the repositories as well. To install it type apt-get install chm2pdf as root, and to use it, all you have to do is:

chm2pdf --webpage chm_file.chm

A PDF file with the name chm_file.pdf will be generated, readable with any PDF reader like KPDF. The tool provides many other options for the newly generated PDF file, for a complete list see man chm2pdf.

Updated: Jul 03, 2008 (Created: Jul 03, 2008)

4 comments:

Anonymous said...

Unfortunately all the CHM viewers I've tried have left me wanting, especially in the search department, and kchmviewer is no exception. Its search is too powerful for its own good and cannot be customized. For instance, if I want to only search in titles, there's no way to do that.

And that phrase they display in the left pane ("Type in words to search for: Help") keeps the minimum width of the pane to being unnecessary big, and it bothers me.

Otherwise it has many good points, but the way it intrudes on my screen estate and the search problem are show-stoppers for me.

Craciun Dan said...

I think it's best to convert it to PDF and read it that way. After all CHM is not a free format.

Sushant Srivastava said...

A simple firefox addon to view Chm files:
https://addons.mozilla.org/en-US/firefox/addon/3235
Very Handy, if you ask me.

Anonymous said...

Dan: CHM has free read/write software.

Write support is nowadays available via Free Pascal.