View .chm Files Or Convert to html and pdf Under Linux

There are many computer books come with CHM format.

Gnochm is a CHM file viewer. It is designed to integrate nicely with Gnome. Gnochm has some really nice features for viewing chm files.

Installing Gnochm

sudo apt-get install gnochm

Simply click on the Applications menu in the Accessories section to start Gnochm and open your chm files.

How to Convert .chm ?

Under Linux, you can view a CHM file with the xchm viewer. But sometimes that’s not enough. Suppose you want to edit, republish, or convert the CHM file into another format such as the Plucker eBook format for viewing on your Palm. To do so, you first need to extract the original HTML files from the CHM archive.

This can be done with the CHMLIB (CHM library) and its included helper application extract_chmLib.

Install Chmlib in Ubuntu

sudo apt-get install libchm-bin

Convert .chm files in to HTML files

If you want to convert .chm files in to HTML files use the following command

extract_chmLib book.chm outdir

where book.chm is the path to your CHM file and outdir is a new directory that will be created to contain the HTML extracted from the CHM file.

Convert .chm files in to PDF files

First you need to install htmldoc. HTML processor that generates indexed HTML, PS, and PDF.HTMLDOC is a program for writing documentation in HTML and producing indexed HTML, PostScript, or PDF output (with tables of contents). It supports most HTML 3.2 and some HTML 4.0 syntax, as well as GIF, JPEG, and PNG images.

sudo apt-get install htmldoc

If you want to use htmldoc type the following command in terminal

htmldoc

Once it opens you should see similar to the following screen here you can choose the html file and convert them to pdf,ps

Happy Learning.

3 Responses to “View .chm Files Or Convert to html and pdf Under Linux”

  1. आशीष शुक्ल Says:

    Wow, thanks I’m looking for HTMLDOC like solution, though never tried to google it. Emerging app-text/htmldoc🙂

  2. none Says:

    that’s one way. it’s fine for 1 or to chm. but there needs to be a soltion for multiple files using ONLY the terminal. i need to convert over 100. so this isn’t an optin ;oP

  3. Jan Says:

    In Input – Add files -> select all html-files by pressing Shift, choose Document Type: Continuous

    The document is hidden .pdf, so go to the same folder and choose -> Show hidden files.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: