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
In Terminal, type:
chm2pdf --book filename.chm
# (Where filename is obviously your required file to be converted.)
Thanks to linuxtree