How to: Open CHM Files in Ubuntu and Convert to More Stable Formats




error pageIn Ubuntu, you can easily open pdf files, but if you try opening a chm file, an error often creeps up, saying There is no application installed for this file type. This is because, Ubuntu comes with no integrated support for chm files.

What is .chm file format?

It is basically a microsoft proprietary file format that is basically designed for the help files deployment. It is considered as a handy file format as in this various HTML files can be collected together in one whole compact package and hence used in formation of various ebooks.

How to open CHM file in Ubuntu or any linux version?

Various Linux users find difficulty in opening the .chm file. But with the following steps, it is very easy to open them  :

  • Open the terminal .  Applications-> Accesories->Terminal
  • Install the following software by typing in the terminal

sudo apt-get install xchm

And now you can open any .chm file with the help of XCHM viewer utility.

Now as .chm reader is basically meant for Microsoft help files platform so many of you would be wondering that these Windows help files are irrelevant to UBUNTU. This is helpful in ebooks and online documentation, but  as it was less secure and its interface is also a nerd like, so we can also convert it into many other stable formats. The later section is related to this kind of conversion.

How to convert .chm files to .pdf ?

.chm files does not provide facility for editing and then republishing. Hence, to perform this we need to convert them into .pdf or other more stable format.

Step 1 : Install package libchm-bin.

Generally package libchm-bin is preinstalled in the Ubuntu jaunty and its later version. But you can also install it with the following command in TERMINAL .

sudo apt-get install libchm-bin


Here’s a ScreenShot of the terminal.-

terminal screenshot1

Step 2: Extract all html files.

Secondly we need to extract all the html files with the help of the extract_chmLib, an CHMLIB included application. To do so type the following command in the TERMINAL:

extract_chmLib file.chm htmldir

Example.- As in my case the file is at desktop so file.chm is required file and htmldir is folder that will be automatically generated so at to store all those .html files that are in compact form in .chm file.

heeren@heeren-laptop:~/Desktop$ extract_chmLib Effective\ C++\ \&\ More\ Effective\ C++.chm htmldir

where file name is  Effective\ C++\ \&\ More\ Effective\ C++.chm and the output file directory is htmldir

Here’s a ScreenShot of the terminal.-

image2 e1265472024509 How to: Open CHM Files in Ubuntu and Convert to More Stable Formats


Step 3: Install HTMLDOC.

After extracting the .html files , you need install another utility called “HTMLDOC” so at to convert the all these html pages as full fledged .pdf book.

Type the following command to do so ..

sudo apt-get install htmldoc

After installing the package which is of approx. 10.1 Mb you can open it by simply hitting the following command in your terminal

htmldoc

Here’s a ScreenShot of the interface.-

xchm screenshot3


Add the html files you want to wrap up in the serail order in INPUT tab and don’t forget to check the “web page” as the Document type. Secondly you need to make your output properties which is as follows :


Here’s a ScreenShot of the interface.-

xchm screenshot4

Now  it will take a little time to get your files in repacking and later on to convert them as your pdf book .


Other utilities for opening .chm files?

There are other many other popular utilities available which are as follows :

  • gnochm – much more like that of xchm
  • kchmviewer – for Kbuntu and KDE platforms.


After using all these utilities i’ll put my vote over back to “xchm” . The reason being for such support is primarily stable .


It is easier to use than that of gnochm. Moreover in page search is much better in “xchm”. Secondly for KDE platform users, they can simply open the .chm files in the konqueror ” browser, no need for kchmviewer.

Choice is all Yours.

Enjoy your ebook. So we have overcome Windows Help files too ..

LINUX= Windows + FUN + FREEDOM ..

GO FREEEEE.. :D

Not many people are aware of the ease with which one can perform such operations.

Comments are Welcome.  And, please Share it if you Like it.

It may feel strange since many .chm to pdf convertors are avaiable. But, we will share the Software technique for the same, in our upcoming post!

Thanks.

You can Subscribe to TechTickle Feed or join us on our Facebook Page or follow us on twitter for any queries and to keep yourself updated with the latest updates!

  • Share/Bookmark

You might like:

Enter your email address:

Delivered by FeedBurner


About - heerendevil

I am a Linux fan. Follow me on Twitter.

2 Comments | Add your own!

  1. Social comments and analytics for this post…

    This post was mentioned on Twitter by techtickle: TechTickLe Tutorials- How to: Open CHM Files in Ubuntu and Convert to More Stable Formats http://bit.ly/a3XWw7 (RT if u like it)…

  2. [...] This post was mentioned on Twitter by Sahil Malhan, Sahil Malhan, Sahil Malhan, slimb mani, slimb mani and others. slimb mani said: TechTickLe Tutorials- How to: Open CHM Files in Ubuntu and Convert to More Stable Formats http://bit.ly/a3XWw7 (RT if u like it) @techtickle [...]

Leave a Comment