Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-20-2010, 04:32 PM   #1
picardo
Member
picardo began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2010
Device: Kindle 2, Kindle DX
How to edit CHM books before converting?

Hi there,

I have a few CHM books that have unseemly Prev/Next buttons in them. They cause the book page to be very tight on the Kindle. So I decided to remove them by decompiling the CHM into HTML and took out the buttons. Now I have a ton of HTML files, but I cannot compile them back into the CHM format...I guess it doesn't matter if I can compile them into CHM but any format would do. What should I do?

thanks.
picardo is offline   Reply With Quote
Old 04-20-2010, 08:13 PM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,908
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by picardo View Post
Hi there,

I have a few CHM books that have unseemly Prev/Next buttons in them. They cause the book page to be very tight on the Kindle. So I decided to remove them by decompiling the CHM into HTML and took out the buttons. Now I have a ton of HTML files, but I cannot compile them back into the CHM format...I guess it doesn't matter if I can compile them into CHM but any format would do. What should I do?

thanks.
Can you run this document in a browser? If so there must be a main index or table of content page. Try dragging that html page to Calibre, it should grab up the appropriate images and additional html files and zip them up. Then convert to the format of your choice.
DoctorOhh is online now   Reply With Quote
 
Advertisement
Old 04-21-2010, 03:26 PM   #3
picardo
Member
picardo began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2010
Device: Kindle 2, Kindle DX
hey dwanthny,

Thanks for the reply. When I do what you told me, it seems Calibre produces an EPUB file. Then when I click "send to device" it tells me it needs to convert to the MOBI format, but after trying for more than five minutes, it fails with an error message. This is the traceback:

Quote:
Python function terminated unexpectedly
string index out of range (Error Code: 1)
Traceback (most recent call last):
File "site.py", line 103, in main
File "site.py", line 85, in run_entry_point
File "site-packages\calibre\utils\ipc\worker.py", line 99, in main
File "site-packages\calibre\gui2\convert\gui_conversion.py", line 24, in gui_convert
File "site-packages\calibre\ebooks\conversion\plumber.py", line 898, in run
File "site-packages\calibre\ebooks\mobi\output.py", line 182, in convert
File "site-packages\calibre\ebooks\mobi\writer.py", line 367, in __call__
File "site-packages\calibre\ebooks\mobi\writer.py", line 380, in _dump_stream
File "site-packages\calibre\ebooks\mobi\writer.py", line 395, in _generate_content
File "site-packages\calibre\ebooks\mobi\writer.py", line 1336, in _generate_images
File "site-packages\calibre\ebooks\mobi\writer.py", line 123, in rescale_image
File "site-packages\PIL\Image.py", line 653, in convert
File "site-packages\PIL\ImageFile.py", line 189, in load
File "site-packages\PIL\PngImagePlugin.py", line 349, in load_read
File "site-packages\PIL\PngImagePlugin.py", line 92, in read
File "site-packages\PIL\PngImagePlugin.py", line 40, in i32
IndexError: string index out of range
picardo is offline   Reply With Quote
Old 04-22-2010, 02:06 AM   #4
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,908
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by picardo View Post
Thanks for the reply. When I do what you told me, it seems Calibre produces an EPUB file. Then when I click "send to device" it tells me it needs to convert to the MOBI format, but after trying for more than five minutes, it fails with an error message. This is the traceback:
Just dragging it to Calibre didn't convert it to anything it just zipped up the files. Does it give you the same error if you just try to convert straight to Mobi prior to sending?

Maybe someone can shed some light on error.
DoctorOhh is online now   Reply With Quote
Old 04-22-2010, 05:37 AM   #5
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: 26,433
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
that error basically means one of the images in the file is corrupted (at least to the extent that the imaging library calibre uses cannot process it).
kovidgoyal is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting from CHM to MOBI guttaperk Calibre 6 02-08-2012 04:49 PM
Problems converting .chm to .mobi (or .epub) Chris. Calibre 4 10-04-2010 09:47 PM
CHM books drarjun Calibre 0 07-25-2010 10:27 PM
Page cutoff by converting chm to epub on sony 505 Hein Calibre 5 09-18-2009 01:20 PM
Converting CHM to Html Tahras Rastah Workshop 0 01-16-2008 06:11 PM


All times are GMT -4. The time now is 11:05 PM.


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