My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
HowToInstall  
Installation instructions
Featured, Phase-Deploy
Updated Feb 4, 2010 by devicera...@gmail.com

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:

  • chmlib
  • pychm
  • htmldoc

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

  • libchm
  • libchm-bin
  • libchm-dev
  • python-chm
  • html-doc
  • htmldoc-common

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

  • Download the archive
  • Unzip it (tar -xzvf chm2pdf-x.x.x.tar.gz)
  • Enter the directory
  • Become root
  • Type "python setup.py install"
  • Enjoy

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

Comment by tbone1...@gmail.com, Oct 5, 2007

Dependencies

On my Ubuntu Feisty Fawn I need pdftk installed.

Comment by priyadar...@gmail.com, 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 priyadar...@gmail.com, Oct 14, 2007
Comment by ppereva...@gmail.com, 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 blub...@gmail.com, Nov 6, 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 project member chriskar...@gmail.com, 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 xima...@gmail.com, 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 tho...@gmail.com, Jan 15, 2008

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

Comment by zioa...@gmail.com, Feb 7, 2008

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

Alessandro

Comment by tri...@gmail.com, Feb 20, 2008

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

Comment by opensrcg...@gmail.com, 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 lightm...@gmail.com, 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 brantwin...@gmail.com, Jun 6, 2008

How do I do this on OS X 10.5 ?

Comment by simps...@gmail.com, Aug 8, 2008

# chm2pdf --book RHCEStudy.chm rm: cannot remove `/tmp/chm2pdf/orig/RHCEStudy/': No such file or directory rm: cannot remove `/tmp/chm2pdf/work/RHCEStudy/': No such file or directory sh: /tmp/chm2pdf/work/RHCEStudy/urlslist.txt: No such file or directory Traceback (most recent call last):

File "/usr/bin/chm2pdf", line 1111, in ?
main(sys.argv)
File "/usr/bin/chm2pdf", line 1107, in main
convert_to_pdf(cfile, filename, outputfilename, options)
File "/usr/bin/chm2pdf", line 326, in convert_to_pdf
objective_urls=get_objective_urls_list(filename)
File "/usr/bin/chm2pdf", line 114, in get_objective_urls_list
flist=open(CHM2PDF_WORK_DIR+'/urlslist.txt','rU')
IOError: 2? No such file or directory: '/tmp/chm2pdf/work/RHCEStudy/urlslist.txt'

Comment by zk...@126.com, Oct 1, 2008

>Comment by simpsonm, Aug 08, 2008

># chm2pdf --book RHCEStudy.chm rm: cannot remove /tmp/chm2pdf/orig/RHCEStudy/': >No such file or directory rm: cannot remove /tmp/chm2pdf/work/RHCEStudy/': No >such file or directory sh: /tmp/chm2pdf/work/RHCEStudy/urlslist.txt: No such file >or directory Traceback (most recent call last):

It seems that chm2pdf try to remove someting that not even exist. It is in line 1091 and line 1092 in /usr/bin/chm2pdf.I change the "rm -r "to "rm -f -r".

Hope this may help you.

Comment by crosv...@gmail.com, Oct 1, 2008

question: How I can remove the program after install it?

Comment by mvniek...@gmail.com, Dec 16, 2008

This script doesn't work for me (Ubuntu Intrepid 810). Manually installed chm with ./configure --enable-examples and the "No such file or directory" disappeared. Still, there is an "Index out of bounds" error I cannot shake:

AutomatingUNIXAndLinuxAdministration.chm:
--> /#IDXHDR
--> /#STRINGS
--> /#SYSTEM
--> /#TOPICS
--> /#URLSTR
--> /#URLTBL
--> /#WINDOWS
--> /$FIftiMain
--> /$OBJINST
--> /$WWAssociativeLinks/Property
--> /$WWKeywordLinks/Property
--> /8193.hhc
--> /8193final/_.gif
--> /8193final/backcover.html
--> /8193final/images/1590592123.gif
--> /8193final/images/_.gif
--> /8193final/images/fig13-1.jpg
--> /8193final/images/fig13-1_0.jpg
--> /8193final/images/fig13-2.jpg
--> /8193final/images/fig13-2_0.jpg
--> /8193final/images/fig13-3.jpg
--> /8193final/images/fig13-3_0.jpg
--> /8193final/images/fig13-4.jpg
--> /8193final/images/fig13-4_0.jpg
--> /8193final/images/fig13-5.jpg
--> /8193final/images/fig13-5_0.jpg
--> /8193final/images/ie.content.css
--> /8193final/images/next.gif
--> /8193final/images/previous.gif
--> /8193final/images/teamlib.gif
--> /8193final/images/xpolecat.css
--> /8193final/LiB0001.html
--> /8193final/LiB0002.html
--> /8193final/LiB0003.html
--> /8193final/LiB0004.html
--> /8193final/LiB0005.html
--> /8193final/LiB0006.html
--> /8193final/LiB0007.html
--> /8193final/LiB0008.html
--> /8193final/LiB0009.html
--> /8193final/LiB0010.html
--> /8193final/LiB0011.html
--> /8193final/LiB0012.html
--> /8193final/LiB0013.html
--> /8193final/LiB0014.html
--> /8193final/LiB0015.html
--> /8193final/LiB0016.html
--> /8193final/LiB0017.html
--> /8193final/LiB0018.html
--> /8193final/LiB0019.html
--> /8193final/LiB0020.html
--> /8193final/LiB0021.html
--> /8193final/LiB0022.html
--> /8193final/LiB0023.html
--> /8193final/LiB0024.html
--> /8193final/LiB0025.html
--> /8193final/LiB0026.html
--> /8193final/LiB0027.html
--> /8193final/LiB0028.html
--> /8193final/LiB0029.html
--> /8193final/LiB0030.html
--> /8193final/LiB0031.html
--> /8193final/LiB0032.html
--> /8193final/LiB0033.html
--> /8193final/LiB0034.html
--> /8193final/LiB0035.html
--> /8193final/LiB0036.html
--> /8193final/LiB0037.html
--> /8193final/LiB0038.html
--> /8193final/LiB0039.html
--> /8193final/LiB0040.html
--> /8193final/LiB0041.html
--> /8193final/LiB0042.html
--> /8193final/LiB0043.html
--> /8193final/LiB0044.html
--> /8193final/LiB0045.html
--> /8193final/LiB0046.html
--> /8193final/LiB0047.html
--> /8193final/LiB0048.html
--> /8193final/LiB0049.html
--> /8193final/LiB0050.html
--> /8193final/LiB0051.html
--> /8193final/LiB0052.html
--> /8193final/LiB0053.html
--> /8193final/LiB0054.html
--> /8193final/LiB0055.html
--> /8193final/LiB0056.html
--> /8193final/LiB0057.html
--> /8193final/LiB0058.html
--> /8193final/LiB0059.html
--> /8193final/LiB0060.html
--> /8193final/LiB0061.html
--> /8193final/LiB0062.html
--> /8193final/LiB0063.html
--> /8193final/LiB0064.html
--> /8193final/LiB0065.html
--> /8193final/LiB0066.html
--> /8193final/LiB0067.html
--> /8193final/LiB0068.html
--> /8193final/LiB0069.html
--> /8193final/LiB0070.html
--> /8193final/LiB0071.html
--> /8193final/LiB0072.html
--> /8193final/LiB0073.html
--> /8193final/LiB0074.html
--> /8193final/LiB0075.html
--> /8193final/LiB0076.html
--> /8193final/LiB0077.html
--> /8193final/LiB0078.html
--> /8193final/LiB0079.html
--> /8193final/LiB0080.html
--> /8193final/LiB0081.html
--> /8193final/LiB0082.html
--> /8193final/LiB0083.html
--> /8193final/LiB0084.html
--> /8193final/LiB0085.html
--> /8193final/LiB0086.html
--> /8193final/LiB0087.html
--> /8193final/LiB0088.html
--> /8193final/LiB0089.html
--> /8193final/LiB0090.html
--> /8193final/LiB0091.html
--> /8193final/LiB0092.html
--> /8193final/LiB0093.html
--> /8193final/LiB0094.html
--> /8193final/LiB0095.html
--> /8193final/LiB0096.html
--> /8193final/LiB0097.html
--> /8193final/LiB0098.html
--> /8193final/LiB0099.html
--> /8193final/LiB0100.html
--> /8193final/LiB0101.html
--> /8193final/LiB0102.html
--> /8193final/LiB0103.html
--> /8193final/LiB0104.html
--> /8193final/LiB0105.html
--> /8193final/LiB0106.html
--> /8193final/LiB0107.html
--> /8193final/LiB0108.html
--> /8193final/LiB0109.html
--> /8193final/LiB0110.html
--> /8193final/LiB0111.html
--> /8193final/LiB0112.html
--> /8193final/LiB0113.html
--> /8193final/LiB0114.html
--> /8193final/LiB0115.html
--> /8193final/LiB0116.html
--> /8193final/LiB0117.html
--> /8193final/LiB0118.html
--> /8193final/LiB0119.html
--> /8193final/LiB0120.html
--> /8193final/LiB0121.html
--> /8193final/LiB0122.html
--> /8193final/LiB0123.html
--> /8193final/LiB0124.html
--> /8193final/LiB0125.html
--> /8193final/LiB0126.html
--> /8193final/LiB0127.html
--> /8193final/LiB0128.html
--> /8193final/LiB0129.html
--> /8193final/LiB0130.html
--> /8193final/LiB0131.html
--> /8193final/LiB0132.html
--> /8193final/LiB0133.html
--> /8193final/LiB0134.html
--> /8193final/LiB0135.html
--> /8193final/LiB0136.html
--> /8193final/LiB0137.html
--> /8193final/LiB0138.html
--> /8193final/LiB0139.html
--> /8193final/LiB0140.html
--> /8193final/LiB0141.html
--> /8193final/LiB0142.html
--> /8193final/toc.html
   *** ERROR ***
Traceback (most recent call last):
  File "/usr/bin/chm2pdf", line 1111, in <module>
    main(sys.argv)
  File "/usr/bin/chm2pdf", line 1107, in main
    convert_to_pdf(cfile, filename, outputfilename, options)
  File "/usr/bin/chm2pdf", line 326, in convert_to_pdf
    objective_urls=get_objective_urls_list(filename)
  File "/usr/bin/chm2pdf", line 119, in get_objective_urls_list
    urls_list.append(spline[5])
IndexError: list index out of range
Comment by amareshchandradas2005, Feb 9, 2009

same for me too................

Comment by amareshchandradas2005, Feb 9, 2009

Hi crosvera,

Reply to "Question: How I can remove the program after install it? "

Usages :-

sudo apt-get remove <Debian_Package_name>

sudo apt-get remove chm2pdf

else check "man dpkg" for more information

Comment by JingZhan...@gmail.com, Jul 29, 2009

Hi, seems I can't use it in opensuse 11.1.

As it complains can't find chm module,

I try to install pychm, but it complains python version is not 2.4. (suse 11 has v 2.6)

Any idea how to solve this problem?

Comment by mailxien...@gmail.com, Jan 4, 2010

"rpm -ivh pychm-0.8.4-2.4.x86_64.rpm" works on OpenSUSE11.1 which can be found in http://rpm.pbone.net/index.php3/stat/4/idpl/11800871/com/pychm-0.8.4-2.4.x86_64.rpm.html

Comment by spyr...@gmail.com, Sep 4, 2011
I have issue with chm that contain gif. Any workaround ?

Sign in to add a comment
Powered by Google Project Hosting