HOME - Recent Changes - Search:

Academic Work


Personal

* pot de départ


dblp


(:twitter:)

-----

[ edit | logout ]
[ help | sandbox | passwd ]

CHM to PDF conversion

#############################

Question

How to convert chm files to pdf?

Update (new answer)

sudo apt-get  install  chm2pdf

Then:

chm2pdf [--book | --webpage | --continuous] file.chm

Answer (old)

Step 1

First, we need to extract the compressed HTML files from the chm file.

$ sudo apt-get  install  libchm-bin
$ extract_chmLib  book.chm  outdir

For GUI junkies there is a more easy method. Open kchmviewer or install it (sudo apt-get install kchmviewer), then FileExtract chm content…, and select the destination folder.

Step 2

We will need the htmldoc program to group HTML files together and export them in a pdf file.

$ sudo apt-get  install  htmldoc

Then start htmldoc.

Input → Add Files…choose the html files from outdir (created at Step 1)
Document Typelet it be Web Page
OutputChoose the output directory and output filename. Also specify PDF as output format.
Pageprecise the page size (letter, A/4, etc.)

If the order of HTML files is not correct, then:

  • Click on Save As…, and save it to a file, e.g. file.book.
  • Open file.book with your favorite text editor (e.g. vim), and change the order of HTML files. (You could also do it in htmldoc, but that'd be too slow.)
  • When done, open the corrected file in htmldoc and click on Generate.

That's all.

Cloud City


anime | bash | blogs | bsd | c/c++ | c64 | calc | comics | convert | cube | del.icio.us | digg | east | eBooks | egeszseg | elite | firefox | flash | fun | games | gimp | google | groovy | hardware | hit&run | howto | java | javascript | knife | lang | latex | liferay | linux | lovecraft | magyar | maths | movies | music | p2p | perl | pdf | photoshop | php | pmwiki | prog | python | radio | recept | rts | scala | scene | sci-fi | scripting | security | shell | space | súlyos | telephone | torrente | translate | ubuntu | vim | wallpapers | webutils | wikis | windows


Blogs and Dev.

* Ubuntu Incident
* Python Adventures
* me @ GitHub


Places

Debrecen | France | Hungary | Montreal | Nancy


Notes

full circle | km


Hobby Projects

* Jabba's Codes
* PmWiki
* Firefox
* PHP
* JavaScript
* Scriptorium
* Tutorials
* me @ GitHub


Quick Links


[ edit ]

View - Edit - History - Attach - Print *** Report - Recent Changes - Search
Page last modified on 2009 December 09, 07:48