Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Sony Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-28-2008, 05:27 AM   #1
davidw89
Connoisseur
davidw89 began at the beginning.
 
davidw89's Avatar
 
Posts: 51
Karma: 10
Join Date: Dec 2007
Device: none atm
What do i do with .CHM files

I have a couple of .CHM files.

What would be the best solution to get them onto the Sony Ebook Reader?

I want to convert to .PDF format. What free open source program would allow me to do tat (iam running windows vista)

Thanks!
davidw89 is offline   Reply With Quote
Old 07-28-2008, 06:09 AM   #2
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
A quick google gave me numerious for-pay windows versions and more than one version that looks free:

http://www.gridinsoft.com/chm.php
http://text-mining-tool.com/

Note: I have never tried any of these tools. I am not responsible if they eat your ebooks, your computer, or sleep with your wife.
acidzebra is offline   Reply With Quote
Advert
Old 07-28-2008, 06:14 AM   #3
lordmax
Enthusiast
lordmax began at the beginning.
 
Posts: 42
Karma: 11
Join Date: Jun 2008
Location: Turin, Italy
Device: iLiad, Opus, cybook gen10, Palm LifeDrive, NetBookVaio, Kindle, Tolino
chm

HI

Quote:
Originally Posted by acidzebra View Post
I'm usign chmdecoder and it work fine for my needs but I'll never used (for now) to convert a chm into an ebook.
It convert chm into a html set of file so I don't see any problem but I'll never tryied
lordmax is offline   Reply With Quote
Old 07-28-2008, 07:28 AM   #4
davidw89
Connoisseur
davidw89 began at the beginning.
 
davidw89's Avatar
 
Posts: 51
Karma: 10
Join Date: Dec 2007
Device: none atm
Quote:
Originally Posted by lordmax View Post
HI



I'm usign chmdecoder and it work fine for my needs but I'll never used (for now) to convert a chm into an ebook.
It convert chm into a html set of file so I don't see any problem but I'll never tryied
Ok i've just used chm decoder and it came up with a folder and a .html file..

so what do i do now?
davidw89 is offline   Reply With Quote
Old 07-28-2008, 07:32 AM   #5
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
Quote:
Originally Posted by davidw89 View Post
Ok i've just used chm decoder and it came up with a folder and a .html file.. so what do i do now?
Convert it into a Sony native LRF file using Calibre's html2lrf, or perhaps print it as PDF using PDFcreator et al (http://sourceforge.net/projects/pdfcreator/ ), the possibilities are endless.
acidzebra is offline   Reply With Quote
Advert
Old 07-28-2008, 09:08 AM   #6
davidw89
Connoisseur
davidw89 began at the beginning.
 
davidw89's Avatar
 
Posts: 51
Karma: 10
Join Date: Dec 2007
Device: none atm
Calibre dont work..no idea how
I have PDFCreater as well

I have a folder with random .htm and some junks and outside of that folder i get a .html file which i can open in firefox which gives me the same layout as .chm

But when i drag that .html into pdfcreater or any other converter it doesn't convert proferly..
davidw89 is offline   Reply With Quote
Old 07-28-2008, 10:27 AM   #7
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
Okay, I tried it with an old CHM file I had lying around. Used CHMdecoder, and this works okay. I got a index.htm (which is an empty frameset with two frames, one for the TOC and one for the text), and a subfolder with all the chapters, named "ch01.htm", "ch02.htm" and so on.

Now trying to convert index.htm is useless. But converting the chapters is very possible, although you have to do it from a command prompt. So open one, navigate to the folder with all the ch0X.htm files, and type the following:

html2lrf --link-levels=30 ch00.htm
(assuming you have Calibre installed)

The --link-levels option is a little tricky, as it will traverse any links between the local files (thus making all these chXX.htm files into one big lrf) so you might want to play with the values a little. Anything too small, and you will not get the entire book. Too big, and it will recurse several times over creating a much bigger file than needed.

There is also the matter of chapters and a table of content. I have not solved this issue yet, but I opened a thread on the Calibre section:
https://www.mobileread.com/forums/showthread.php?t=26985

but for now you will end up with a massive LRF file with no TOC/chapters, although it will maintain the "previous/next" links you find in the htm files.

Last edited by acidzebra; 07-28-2008 at 10:30 AM.
acidzebra is offline   Reply With Quote
Old 07-28-2008, 11:24 AM   #8
SeaWolf
Connoisseur
SeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileRead
 
SeaWolf's Avatar
 
Posts: 63
Karma: 65091
Join Date: Jul 2008
Location: Sydney, Australia
Device: Kindle Paperwhite WiFi
Quote:
Originally Posted by acidzebra View Post
The --link-levels option is a little tricky, as it will traverse any links between the local files (thus making all these chXX.htm files into one big lrf) so you might want to play with the values a little. Anything too small, and you will not get the entire book. Too big, and it will recurse several times over creating a much bigger file than needed.
Hang on, surely when it finds a link to a piece of HTML it is only going to include it in the file once, no matter how many times it is linked to. Each new link should point to the copy already added to the book. Or does it go and include a new copy of the same piece for every link?
If it's doing the latter then I would say that's a bug.
SeaWolf is offline   Reply With Quote
Old 07-28-2008, 11:30 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
It most certainly doesn't include multiple copies of the same file unless the same file.
kovidgoyal is offline   Reply With Quote
Old 07-28-2008, 11:49 AM   #10
SeaWolf
Connoisseur
SeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileReadSeaWolf has read every ebook posted at MobileRead
 
SeaWolf's Avatar
 
Posts: 63
Karma: 65091
Join Date: Jul 2008
Location: Sydney, Australia
Device: Kindle Paperwhite WiFi
I'm a tad confused. It's going to construct the lrf file with just one copy of each HTML page, even if there are multiple links to that page in other pages. So even if the --link-levels was set very high, once it has been set high enough to capture all of the HTML pages, the resulting lrf should not get any bigger, even if --link-levels is set higher.
Is that right?
SeaWolf is offline   Reply With Quote
Old 07-28-2008, 11:59 AM   #11
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
Hold on, testing this now. My initial remark was based on the commandline output I saw while converting the CHM-turned-html and the fact that the "next" and "previous" buttons featured therein jumped all over the book.

I'm off to do some more tests with various CHM files.

Last edited by acidzebra; 07-28-2008 at 12:24 PM.
acidzebra is offline   Reply With Quote
Old 07-28-2008, 01:24 PM   #12
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
My Findings and a general method of making .CHM files into BBeB

Regarding HTML2LRF and decompiled CHM files, it seems there is some unwanted recursion going on. In addition, TOC and chapter generation can give some unexpected results. Attached are the actual TOC of the CHM file, and what it looked like on my reader. The decompiled CHM was processed using:
html2lrf --link-levels=300 --chapter-attr 'font,size,\+3' --add-chapters-to-toc ch00.htm
THIS COMMAND IS NOT GENERIC AND WILL LIKELY NOT WORK ON YOUR CHM FILE. READ ON:


And I've been fiddling with CHM files some more. It appears there are many tools to generate CHM files, and no two do it the same way. This means that if you decompile them with CHMdecoder and start working on the resultant HTML files, you will have a lot of handwork.

Problems:
a) file names can be anything at all, and the files can also exist in a subfolder.
b) chapters can be tagged with anything at all, ranging from the helpful <h2 class="docChapterTitle"> to <font size="+3"> to the utterly useless <a name="6f7637da-8ae1-4f29-912a-5f5bb8d10b4e"> (this file had a unique code for each chapter, yay!).

Workarounds:
a) Open the decompiled CHM. In the left-hand side TOC, right-click on the first Chapter and select "Open in New Tab" or "Open in New Window". You will now see the name of the file that you want to start the conversion with in the address bar.
b) If Calibre doesn't pick up on chapters automatically, you can find out how chapters are tagged by viewing the source (menu View > Source) of the HTML files.

Armed with this information, you can now open a command prompt in the decompiled CHM folder, and make a LRF file from it. Although it probably won't be all that pretty
Attached Thumbnails
Click image for larger version

Name:	TOCissue.jpg
Views:	374
Size:	45.7 KB
ID:	14716   Click image for larger version

Name:	actualTOC.jpg
Views:	404
Size:	39.0 KB
ID:	14717  

Last edited by acidzebra; 07-28-2008 at 01:29 PM.
acidzebra is offline   Reply With Quote
Old 07-28-2008, 02:08 PM   #13
vaporetto
Member
vaporetto began at the beginning.
 
vaporetto's Avatar
 
Posts: 10
Karma: 10
Join Date: Jun 2006
Device: Sony Reader
I use chmagic. This is not free but it is very simple and works pretty good for me.
http://www.bisenter.com/
vaporetto is offline   Reply With Quote
Old 07-28-2008, 04:39 PM   #14
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,858
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Have you tried chmlib? It's the backed of a couple of open source chm viewers.
kovidgoyal is offline   Reply With Quote
Old 07-29-2008, 05:32 PM   #15
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
No, but I just installed a couple of packages

I will try it out, thanks!
acidzebra is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
a problem with chm files after conversion ramady Kindle Formats 3 07-11-2010 08:27 PM
Reader capable of CHM files Zorz Which one should I buy? 5 12-03-2009 12:01 PM
Reading chm files UchihaNaru Astak EZReader 2 09-25-2009 09:07 AM
CHM Files on Iliad KingDani iRex 0 02-10-2008 04:10 PM
Best one for CHM files and techbooks drkm_4_frm Which one should I buy? 2 12-03-2007 03:39 PM


All times are GMT -4. The time now is 07:10 PM.


MobileRead.com is a privately owned, operated and funded community.