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.

 

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

 

Related posts:

Line Break

Author: Sahil Malhan (14 Articles)

Sahil Malhan is 20 years old, part-time blogger and designer with really strong passion for his work. He considers Blogging as the best source of self education. He usually hangs out in Twitter tweeting tech related links. If You are on Facebook Sahil Malhan can be your friend there. If You have any questions feel free to write and add him to Gtalk - it will be nice to get comments and direct contact from you!

blog comments powered by Disqus