I’ve been looking for a way to print CHM files in (Fedora) Linux, since my CHM file viewer, chmsee, doesn’t have a print option (and probably all other CHM file viewers as well). Searching for CHM to PDF converters in Fedora led me to chm2pdf.
chm2pdf has a couple of requirements:
- chmlib
- pychm
- htmldoc
To install the necessary packages, execute this command in your terminal as root:
yum install chmlib python-chm htmldocTo install chm2pdf:
- Download the archive from it’s Google Code project hosting page.
- Extract the archive
- As root, type
python setup.py installfrom the directory extracted from the archive
I got the following message after running the last command:
running install running build running build_scripts creating build creating build/scripts-2.6 copying and adjusting chm2pdf -> build/scripts-2.6 changing mode of build/scripts-2.6/chm2pdf from 644 to 755 running install_scripts copying build/scripts-2.6/chm2pdf -> /usr/bin changing mode of /usr/bin/chm2pdf to 755 running install_egg_info Writing /usr/lib/python2.6/site-packages/chm2pdf-0.9-py2.6.egg-info
I tested the installation with the following command and it produced the PDF file:
chm2pdf --webpage somefile.chmRelated posts:

Another alternative is Calibre – http://calibre-ebook.com/
I recently converted a large CHM into pdf with OK results. Some sections seem to have ended up duplicated, but nothing was missing, and the diagrams stayed intact.
Interestingly, it worked better on my older Ubuntu system than on OSX – both using the same version of Calibre. I’m guessing different versions of Ghostscript.
Next time I’ll try your recommendation and see how it compares/