Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 11-29-2015, 06:56 PM   #1
volivas
Junior Member
volivas began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2010
Device: Bookeen Cybook Muse Frontlight
images not imported when adding HTML to calibre

I'm trying to import an HTML into calibre. So I make an index.html file, but the images get stripped out. This is a rather large file (60 MB), with many many image files. the image files are located in subfolders of the same directory as the index.html file.

Also when I add the book with calibredb, it says IgnoreFile...file is binary, pertaining to the pages of the images (ex. Figure1-1.htm). Does that have something to do with it?


The images are of a subdirectory of the folder where the index.html file is located. The links to the images are relative, an example is: <img src=chpix/sample1.1.gif border=0>

I've also tried to compress the folder into a zip file and import the zip file, and that shows a file of about the size of the html file with images, but when I convert the file to epub or try to view the zip file, it only shows the index.html file and no other pages of the document.

Any help would be appreciated.

Last edited by volivas; 11-30-2015 at 03:23 PM.
volivas is offline   Reply With Quote
Old 12-01-2015, 10:16 AM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Putting it all in a ZIP file with the correct relative paths certainly should work. Calibre should show the original format as "HTMLZ" and convert to ePub successfully with images intact.

Last edited by HarryT; 12-01-2015 at 11:06 AM. Reason: Typo
HarryT is offline   Reply With Quote
Advert
Old 12-01-2015, 11:33 AM   #3
fidvo
Addict
fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.fidvo ought to be getting tired of karma fortunes by now.
 
Posts: 296
Karma: 1599870
Join Date: Jun 2012
Device: none
Okay, here are some obvious questions.

When you open index.html in a web browser, do you see the images?

Are you certain the images are of the type they claim to be? Some image viewers will happily open a .jpg image with an extension of .png and not tell you it's the wrong file extension.

Are you compressing the folder itself, or are you compressing index.html and all the subfolders?

Are you using the same case (upper/lower) for the references in index.html as the names of the subfolders and image files? I don't know if it makes a difference, but it's something to check at least.

After importing the zip file, try saving it to disk, then unzipping it. Are all the files there?

Does the same thing happen if you import just index.html?
fidvo is offline   Reply With Quote
Old 12-01-2015, 10:13 PM   #4
volivas
Junior Member
volivas began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2010
Device: Bookeen Cybook Muse Frontlight
I'm compressing the folder containing all the files in it, the index file and the subfolders. All the images are gifs, I don't know how to verify that they are what they say they are , but Get Info shows them as gifs.

The index file only has hyperlinks to the image pages in the file. There is only one image in the index file, and that shows up correctly.

I imported the zip file and saved to disk and the images are all there, along with an opf file.

All the references in the index file are
volivas is offline   Reply With Quote
Old 12-01-2015, 10:15 PM   #5
volivas
Junior Member
volivas began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2010
Device: Bookeen Cybook Muse Frontlight
Quote:
Originally Posted by HarryT View Post
Putting it all in a ZIP file with the correct relative paths certainly should work. Calibre should show the original format as "HTMLZ" and convert to ePub successfully with images intact.
When I import the zip file, all the files are there (and the file format is zip, not HTMLZ), but when I convert the zip file to an ePub, only the index file is converted. The index file is about 92 pages, and that's all that shows up in the ePub.
volivas is offline   Reply With Quote
Advert
Old 12-01-2015, 10:26 PM   #6
AnemicOak
Bookaholic
AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.AnemicOak ought to be getting tired of karma fortunes by now.
 
AnemicOak's Avatar
 
Posts: 14,391
Karma: 54969924
Join Date: Oct 2007
Location: Minnesota
Device: iPad Mini 4, AuraHD, iPhone XR +
This info may (or may not) help...
http://manual.calibre-ebook.com/faq....specific-order
AnemicOak is offline   Reply With Quote
Old 12-02-2015, 04:25 PM   #7
volivas
Junior Member
volivas began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2010
Device: Bookeen Cybook Muse Frontlight
The index.html file lists the pages in order. There's no problem with the index.html being recognized and displaying the pages, the problem is with the additional figures which are on separate pages that are linked by the main pages of the book. For example there is a Figure1-1.htm, which is linked in a table on page 93 (the first page after the index).
volivas is offline   Reply With Quote
Old 12-02-2015, 07:27 PM   #8
volivas
Junior Member
volivas began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2010
Device: Bookeen Cybook Muse Frontlight
Now I've tried to import the original rar without expanding it first. I'm trying to view the file but I get an error: Errno 32 broken pipe.

Here's the details:
calibre, version 2.45.0
ERROR: Could not open ebook: [Errno 32] Broken pipe

Traceback (most recent call last):
File "site-packages/calibre/gui2/viewer/main.py", line 37, in run
File "lib/python2.7/threading.py", line 763, in run
File "site-packages/calibre/ebooks/oeb/iterator/book.py", line 112, in __enter__
File "site-packages/calibre/customize/conversion.py", line 241, in __call__
File "site-packages/calibre/ebooks/conversion/plugins/html_input.py", line 78, in convert
File "site-packages/calibre/ebooks/conversion/plugins/html_input.py", line 140, in create_oebbook
File "site-packages/calibre/ebooks/html/input.py", line 242, in get_filelist
File "site-packages/calibre/ebooks/html/input.py", line 221, in traverse
IOError: [Errno 32] Broken pipe

I've made an exception for calibre in my antivirus, and for that matter have disabled automatic protection. But the issue persists. I'm not sure that that has anything to do with not being able to convert the file to ePub. I've tried HTMLZ and LIT. Now I'm trying MOBI.

Last edited by volivas; 12-02-2015 at 08:28 PM.
volivas is offline   Reply With Quote
Old 12-03-2015, 05:38 PM   #9
volivas
Junior Member
volivas began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2010
Device: Bookeen Cybook Muse Frontlight
The broken pipe message was fixed with help from another thread, disabled the DRM removal plugin. But the other issue remains. I tried to add to calibre as multiple files from the RAR, and then convert to ePub and then merge with the ePubMerge plugin, but the images were lost in the merge. I'm giving up on this book. Thanks for your help everybody.
volivas is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding images to a book in Calibre gstod2001 Calibre 10 08-25-2015 12:40 PM
adding HTML files into Calibre diolu Calibre 1 10-22-2012 09:02 AM
adding an html doc to calibre bwana Library Management 3 01-12-2012 08:23 PM
Cover images dissappeared after adding some books from my Calibre library fictionaddiction Kobo Reader 8 06-23-2011 10:42 AM
Adding author names to imported books rcs1000 Sony Reader 2 10-11-2006 12:29 PM


All times are GMT -4. The time now is 02:15 PM.


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