What's new? | Help | Directory | Sign in
Google
chm2pdf
A script that converts CHM files into PDF files
  
  
  
  
    
Search
for
Updated May 05, 2008 by devicerandom
Labels: Featured, Phase-Deploy
HowToInstall  
Installation instructions

From your package manager

As of Ubuntu 8.04, chm2pdf is in the universe repository. You can therefore install chm2pdf from your package manager. The same holds for Debian testing.

It also seems that it is included in FreeBSD ports. An unofficial Gentoo ebuild is available (check bugs.gentoo.org)

From source

Dependencies

If you want to install chm2pdf from source, you need those packages installed and working: Gentoo:

Ubuntu/Kubuntu/Debian: Anyway, you should need:

Analogous packages should exist on most other Linux/BSD distributions. It seems that

Users have reported success on Mac OS X, however currently this is unsupported.

On Fedora, it has been reported that the chmlib package is missing some essential files. You need to look for chmlib-bin or to compile chmlib by hand.

If you install chmlib from source, do not forget to use the --enable-examples on chmLib, otherwise this script will throw a bunch of exceptions, and will fail.

If you use Mac OS X, and you use darwin ports (port on the cmdline), be aware that the chmlib will NOT be built with this option. You can, however, separately download chmlib and build it yourself with this option, install it, and then re-run the script.

Install

PLEASE AVOID POLLUTING THIS PAGE WITH COMMENTS If you have installation problems, use the Google group.


Comment by priyadarsan.v, Oct 14, 2007

Before these steps you need two other things installed. pychm module ( http://gnochm.sourceforge.net/pychm.html ) and chmlib ( http://www.jedrea.com/chmlib/ )

chmlib needs to be configured with ./configure --enable-examples

Comment by priyadarsan.v, Oct 14, 2007
Comment by pperevalov, Oct 27, 2007

On Ubuntu Gutsy I had to run following command: sudo ln -s /usr/local/lib/libchm.so.0 /usr/lib/libchm.so.0

Comment by blubouy, Nov 06, 2007

A Ubuntu walk through...

http://www.jedrea.com/chmlib/

  • Download chmlib from the above link and Extract the files
  • If you do not already have the "build-essential meta-package" (ie if you have not compiled anything in the past then run)
sudo apt-get install build-essential
  • Next open terminal and,go to the chmlib directory and then run
./configure --enable-examples
  • and then run
  • sudo make install
  • next,install pychm
  • sudo apt-get install python-chm
  • htmldoc
  • sudo apt-get install htmldoc
  • and pdftk
  • sudo apt-get install pdftk

Finally follow the procedure above to install chm2pdf

PS:use

sudo python setup.py install
Comment by ch...@karakas-online.de, Nov 14, 2007

I have made many changes to the script! Read the whole story on my Forum at:

How to convert CHM to PDF with chm2pdf in Linux

For example, now you can use all options of htmldoc (almost 100 of them!) from the command line!

Download it from:

http://www.karakas-online.de/downloads/chm2pdf-0.9.tar.gz

Type

chm2pdf --help

for a quick help. Usage examples and all details in the Forum thread above.

Enjoy! :-)

Chris Karakas http://www.karakas-online.de

Comment by ximaera, Jan 15, 2008

I have built a Debian package for chm2pdf. It is available here: http://ximaera.name/ximaera/files/chm2pdf_0.9_all.deb .

Hope it will be useful for those guys who want to keep all packages' dependencies on their hard disk, not in their heads -)

Feel free to contact me for any issues at ximaera@gmail.com Artyom Gavrichenkov

Comment by thouth, Jan 15, 2008

THIS PRODUCT IS GAY AND DOES NOT WORK BECAUSE ITS NOT ON WINDOWS

Comment by zioalex, Feb 07, 2008

Thanks Guy! Wonderful! :-) A small note. It doesn't work if the filename contain any space.

Alessandro

Comment by trifod, Feb 20, 2008

zioalex try putting the entire filepath in quotes, or escaping the space character ('\ ' instead of ' ').

Comment by opensrcguru, Mar 26, 2008

=on debian etch=

 apt-get install libchm1
 apt-get install libchm-dev
 apt-get install libchm-bin
 apt-get install libchm
 apt-get install htmldoc
 apt-get install htmldoc-common
 apt-get install python-chm
Comment by lightmagi, Apr 17, 2008

page_filename = /tmp/chm2pdf/orig/1111/ Traceback (most recent call last):

File "/usr/bin/chm2pdf", line 887, in <module>
main(sys.argv)
File "/usr/bin/chm2pdf", line 883, in main
convert_to_pdf(cfile, filename, outputfilename, options)
File "/usr/bin/chm2pdf", line 242, in convert_to_pdf
correct_file(page_filename, htmlout_filename, html_list, objective_urls)
File "/usr/bin/chm2pdf", line 113, in correct_file
pf=open(input_file,'r')
IOError: 21? Is a directory

Comment by brantwinter, Jun 06, 2008

How do I do this on OS X 10.5 ?


Sign in to add a comment