![]() |
#1 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#2 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
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 |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 309
Karma: 1645952
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? |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Apr 2010
Device: Bookeen Cybook Muse Frontlight
|
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.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Bookaholic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 14,391
Karma: 54969924
Join Date: Oct 2007
Location: Minnesota
Device: iPad Mini 4, AuraHD, iPhone XR +
|
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() 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).
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#9 |
Junior Member
![]() 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.
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |