|
|
HowToUse
Usage of chm2pdf
Usage:
/usr/bin/chm2pdf (--book / --webpage) [options] input_filename [output_filename]
Either '--book' or '--webpage' MUST be given! Only one of the two options can be present, not both!
chm2pdf supports most command line htmldoc options. For a full summary usage, type chm2pdf --help at the command line.
PLEASE DO NOT POLLUTE THIS WIKI PAGE WITH COMMENTS If you have trouble using chm2pdf, use the Google group instead.
Sign in to add a comment

Do not forget to use the --enable-examples on chmLib, otherwise this script will throw a bunch of exceptions, and will fail.
If you have a mac, 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.
make sure you have python-chm bindings installed !!!
or you get an error like
ImportError?: No module named chm.chmOn my ubuntu Feisty this is what I obtain:
Traceback (most recent call last):
IOError: 2? No such file or directory: '../tempout//final/toc.html'think the error is in the last line, that double slash "//".
I try to fix it but still got the same... it seems it don't create the tempout directory :-(
On Ubuntu box if you are getting following error
OError: 2? No such file or directory: '../tempout//final/toc.html' and chm2pdf complaains about libchm.so.0 run the command below:
sudo ln -s /usr/local/lib/libchm.so.0 /usr/lib/libchm.so.0
START-QUOTE
On my ubuntu Feisty this is what I obtain:
Traceback (most recent call last):
IOError: 2? No such file or directory: '../tempout//final/toc.html'
think the error is in the last line, that double slash "//".
I try to fix it but still got the same... it seems it don't create the tempout directory :-(
END-QUOTE
Me too. I obtain the same error on Suse 10.1
I have done sudo ln -s /usr/local/lib/libchm.so.0 /usr/lib/libchm.so.0 but the situation is unchanged. Anyway, chm2pdf doesn't complains about libchm.so.0 .
Quilos did you solved the problem '../tempout//final/toc.html' ?
On Ubuntu, open the chm2pdf.py file using your favourite editor and search for or scroll down to the
Section and change the code to
print 'Concatenating '+str(c)+' individual PDF files...' os.system("pdftk *.pdf cat output "+outputfilename)Re run the setup and It Works like a charm ;)
To bluboy. On Suse, this doesn't solve my problem.
I ve got this in the last line:
IOError: 2? No such file or directory: '../tempout//./HTML/pic1.jpg'
Please make chm2pdf inform you when the commands enum_chmLib and htmldoc are not available.
I've got "IOError: No such file or directory" because enum_chmLib wasn't in the system. Before installing libchm-dev it finished printing "Done" at the end, but no pdf was there, because htmldoc wasn't found. After installing htmldoc all was fine.
On Opensuse 10.3, I installed chm2pdf and chmlib (from source with --enable-example), pychm (I extract the tarball in /) and htmldoc (from suse repository), but it appers:
# chm2pdf Traceback (most recent call last):
ImportError?: No module named chm.chmThanks
On ubuntu7, I got HTMLDOC window, when I click the button 'Generate', it prompts "No HTML files to format, cannot generate document". Can anyone tell me what is wrong?
Thanks
I'm on Ubuntu Gutsy 7.10. Followed the nice walkthrough for Ubuntu and managed to convert a 1000+ pages CHM correctly. However subsequent conversions all failed with "no pages generated", but next line says "Written file blah.pdf". Tried to remove /tmp/chm2pdf before conversion - no luck. Also the script cannot parse filenames with blanks even when specified like so: "filename with blank.chm"