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 htmldoc |
To 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.chm |

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/
Thanks a lot ; I followed the steps under fedora FC12 and it’s OK.
but while trying to converting a book name.chm using –book option it gives me an error
when using –webpage option it generated the pdf file after a while but the same problem
as furicle told. after each section in the converted file a duplicated version is generated.
If I remember correctly, I also got errors when using the `–book`option. Were there any missing pages in the generated PDF? How many pages were you trying to convert?
Thanks a lot Eng/Randell for your fast reply;
–book option works sometime on specific files and other times doesn’t work.
I converted till now about four books ; each is about 600~800 pages
and the conversion took about roughly three minutes.
No missing pages – but only duplicated sections when the option –webpage is used.
Neither missing pages nor duplicated sections when –book option work without errors.
Thanks for the addition info, Abdelrhman. I guess it would be best to report those bugs containing the exact errors on the project page so that the owners can work on them: http://code.google.com/p/chm2pdf/
[...] document.write('[Log in to get rid of this advertisement]'); hello people i am referring http://blog.randell.ph/2010/04/03/co…-fedora-linux/ [root@unknown485b39d0b515 ~]# uname -m i686 [root@unknown485b39d0b515 ~]# uname -a Linux [...]