I’ve tried a lot of ways to do this thing in Linux (Ubuntu) and finally I found the easiest one to use.
Called simply as ‘chm2pdf‘, this is a small script written in Python and it uses a few dependencies you might have to install first.
Now to install it, simply follow this guide:
1. Install dependencies by running in the Terminal:
sudo apt-get install htmldoc libchm-bin python-chm
2. Download chm2pdf by clicking this.
3. Now extract the downloaded file.
4. Open your Terminal and browse to the folder you extracted and run:sudo python setup.py install
5. You’re done!
Now to use it is very simple:
In Terminal, type:chm2pdf --book filename.chm # (Where filename is obviously your required file to be converted.)
And surprise surprise, a PDF copy will be waiting for you just next to your CHM file!