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:
To install the necessary packages, execute this command in your terminal as root:
yum install chmlib python-chm htmldoc
To install chm2pdf:
- Download the archive from it’s Google Code project hosting page.
- Extract the archive
- As root, type
python setup.py install
from 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.chm