469,923 Members | 1,799 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,923 developers. It's quick & easy.

chm decompiler

Greetings,
I'm looking for a Perl script (or a platform-independent exe outputting to
STDOUT) that converts chm (HTML Help) files to text or HTML.
Does anyone know if such program exists?

Thanks for your time,
Janssen
Jul 19 '05 #1
3 3996

"meneerjansen" <me**********@europe.be> wrote in message
news:c3**********@reader13.wxs.nl...
Greetings,
I'm looking for a Perl script (or a platform-independent exe outputting to
STDOUT) that converts chm (HTML Help) files to text or HTML.
Does anyone know if such program exists?

Thanks for your time,
Janssen


(platform independent)
Check out the CHM Tool source code here:
http://www.speakeasy.org/~russotto/chm/

If you are on Win32, you can use
this code to extract a page from a chm:

# win32 chm page extractor
#########################
#!/usr/bin/perl
# use Win32::OLE;
my $chmfile = "The Perl CD Bookshelf.chm";

my $HTTP = Win32::OLE->new('MSXML2.XMLHTTP.3.0') or
die "couldn't create MsXml2 object \n";

# strings contains the toc, main, and index page names
my $src = "ms-its:$path/" . $chmfile . "::#STRINGS";

# get using the M$ InfoTech Storage protocol
my $str = ChmGet( \$HTTP, $src);

sub ChmGet
{
my ($obj,$url) = @_;

$$obj->Open( "GET", "$url" , "FALSE");

$$obj->Send();

my $lRes = 0;

$lRes = Win32::OLE->LastError();

if ($lRes ) {
return $lRes;
}
else
{
return $$obj->{responseBody};
}
}
# end script

This code was developed in a project to data_mine
my CHM ebook collection and to insert the results
into MySQL.

I have about 43,000 chapter headings that I can
search with SQL queries. Query results are formatted
as anchor tags in an HTML interface, which when
clicked will open the desired page to the desired chapter.

A single ebook collection can be browsed across
a LAN.

I've looked into doing the same with PDF, but never
got to square-one.

good luck,
msp

AIM:Yahoo:tlviewer

Jul 19 '05 #2
meneerjansen wrote:
Greetings,
I'm looking for a Perl script (or a platform-independent exe outputting to
STDOUT) that converts chm (HTML Help) files to text or HTML.
Does anyone know if such program exists?

Thanks for your time,
Janssen


Search for xchm. If I recal right the lib (don't recal the name, sorry..:o)
used explanes howto do this.

Best Regards
Uten
Jul 19 '05 #3

"meneerjansen" <me**********@europe.be> schreef in bericht
news:c3**********@reader13.wxs.nl...
Greetings,
I'm looking for a Perl script (or a platform-independent exe outputting

to...

Thanks for your tips gnu valued customer and Uten Navn.
Janssen
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.