![]() |
#1 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2023
Device: Fire
|
CHM -> EPUB conversion not finding right content
I have been tasked with converting some CHM files to EPUB. I suspect the CHM may have an unusual structure as it seems to be causing Calibre some problems. The CHM file opens as expected if I use the Windows Help application, so I am certain the file itself is intact.
If I unpack the .chm file I see the following files at root: #IDXHDR #ITBITS #STRINGS #SYSTEM #TOPICS #URLSTR #URLTBL #WINDOWS cbr.css and the directories: chmfile images Within the 'chmfile' directory is the actual core content - approximately 1,250 HTM files, a 'Downloads' directory containing some Word documents, and an 'images' directory containing some JPG images. Calibre appears to be detecting the wrong structure, as what gets produced is an .epub file, but all of the content is just the contents of the cbr.css file from the root. I'm certain there's some way to get it to pick up the correct content from the chmfile directory, but I'm not familiar enough with the tool yet. Any help will be tremendously appreciated. David |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Since you have the unpacked HTMl you can just convert that directly, see https://manual.calibre-ebook.com/faq...specific-order
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2023
Device: Fire
|
Thank you, I'm very grateful for your suggestion. Unfortunately I have a couple of thousand to convert so was trying to complete this as a batch process without regular manual intervention.
Speaking generally is there a way to force the structure detection to go deeper than it is? |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No there is no way you can change what the chm input plugin reads from the chm file, short of modifying the code of chmlib.
|
![]() |
![]() |
![]() |
#5 |
Still reading
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,010
Karma: 105092227
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
|
Try a 3rd party chm converter, there are ones that "unpack" to html on Linux. Not sure about Windows, but I'd assume they exist. Though conversion of a set of HTML files in a directory (I've saved websites with wget) works with calibre, the results sometimes need edited.
Not sure if any of the 3rd party viewers export to docx or html, but unless there is a command line interface that's tedious. Conversion to PDF exists, but PDF is really a terminal format that's a disaster to convert to anything other than paper, screen or images! Last edited by Quoth; 05-19-2023 at 06:36 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2023
Device: Fire
|
Great, I appreciate the responses thank you.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Nightmare epub: it's full of tables (conversion from CHM?) | MelBr | Conversion | 2 | 02-23-2013 11:28 AM |
chm to epub conversion problems | drdaman | Conversion | 1 | 12-09-2012 08:59 PM |
chm to epub conversion pb between 0.8.23 and 0.8.24 (OSX) | fab672000 | Conversion | 2 | 11-05-2011 05:26 PM |
CHM to Epub conversion error | pweasel | Conversion | 0 | 10-04-2011 06:02 PM |
Epub conversion problems from CHM | Chrisness | Calibre | 0 | 09-27-2011 07:30 PM |