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

Go Back   MobileRead Forums > E-Book Software > Calibre > Viewer

Notices

Reply
 
Thread Tools Search this Thread
Old 07-16-2021, 07:32 PM   #16
MicroDrie
Connoisseur
MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 438844
Join Date: Aug 2019
Device: PC, Linux Mint, Tablet, and Telephone
It is a misunderstanding that an HTML program can simply be converted to an Epub format. Apart from the fact that some HTML commands don't work in an Epub, you also have to take into account a fixed format conform the following rules:
  1. All HTML files are in a fixed sub directory Text,
  2. All the css files belong in the Styles sub directory,
  3. All images in the Images sub directory and
  4. All js files in the sub directory Misc.

Your Epub does not comply with rules 2 and 4. After the necessary corrections, the images will be displayed.
MicroDrie is offline   Reply With Quote
Old 07-16-2021, 09:36 PM   #17
jhowell
Grand Sorcerer
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 6,691
Karma: 86234809
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
I have never seen these “rules” in the EPUB specification.
jhowell is offline   Reply With Quote
Advert
Old 07-17-2021, 06:45 AM   #18
MicroDrie
Connoisseur
MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 438844
Join Date: Aug 2019
Device: PC, Linux Mint, Tablet, and Telephone
This is what you want to do:
  1. opens a lean ebook (in epub format)
  2. clicks on a button that opens a file input dialog
  3. selects a .zip file with images
  4. the images are then displayed in the ebook

What I'm curious about is why you put an image in a zip file. If you look at the way in which an image is stored, you will see that the jpg format already does compression and quality reduction. So putting a jpg image in a zip file doesn't give much compression at all. On the other hand, your epub reader must unpack the zip file. So with that choice you get a lot of challenge on the one hand, with maybe a little smaller storage of an image on the other.

I'm not bothered by any in-depth experience on an Apple device how IOS handles accessing files from within an application. That's different for Android. Android keeps increasing security. The result is that it is becoming increasingly difficult to read a file content from an application. In principle, an application can only read files that can only be accessed by the application. If you want to get around that, you have to pull a lot of tricks. I don't see that as easy from doing an Epub. In addition, there is a good chance that for an IOS environment it is different than for an Android environment. How would you go about solving that?

Having written this I come to the conclusion that for an Android environment realization of points 2 and 3 seems an impossible mission.

I don't know what your rationale is for choosing this approach. The charming thing about your idea is that you can combine a short common solution with the freedom of choosing the images to display.

The current restrictions for an Android app for file access means that you might be better off looking for a solution to let the user select the images and then put them in an epub file to be generated.

In terms of storage, it doesn't matter much whether you store the images to be displayed in or outside the epub.

My personal experience with epubs with the combination of javascript, jquery after some adjustments is that you can come a long way. I don't know if there is a solution in Jqeury and/or JavaScript that can include files to generate a new epub with the selected files.
MicroDrie is offline   Reply With Quote
Old 07-17-2021, 06:57 AM   #19
MicroDrie
Connoisseur
MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.MicroDrie ought to be getting tired of karma fortunes by now.
 
Posts: 58
Karma: 438844
Join Date: Aug 2019
Device: PC, Linux Mint, Tablet, and Telephone
Quote:
Originally Posted by jhowell View Post
I have never seen these “rules” in the EPUB specification.
Regardless of whether this is a formal epub rule, it is as Sigil expects how you organize your epub content.

If you add an HTML file to Sigil that refers to a CSS or JS file in the same directory, it will try to place these files in and the reference automatically to those sub directories. This does not always work, so you have to manually add the missing file to the correct directory and adjust it references in the Text directory file.

That's why sometimes things don't work because a js or css file is pointing to the wrong location. This is especially true for a css of js file that refers hardcoded to a font file location.
MicroDrie is offline   Reply With Quote
Old 07-17-2021, 06:49 PM   #20
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 39,768
Karma: 154147706
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by MicroDrie View Post
Regardless of whether this is a formal epub rule, it is as Sigil expects how you organize your epub content.
I hate to burst your bubble but Sigil has not forced directories since the 0.9x versions. You still have an option to restructure epub to Sigil norm but that lives in the Tools menu and is not applied by default. The directory structure you mention dates back to the Open eBook Publication, I vaguely remember, and was recommended not mandatory (i.e., no one paid attention to it) and not necessary since the epub looks at the .opf for the file locations.

Quote:
Originally Posted by MicroDrie View Post
If you add an HTML file to Sigil that refers to a CSS or JS file in the same directory, it will try to place these files in and the reference automatically to those sub directories. This does not always work, so you have to manually add the missing file to the correct directory and adjust it references in the Text directory file.
Again, no longer Sigil's default behaviour other than the logical file locations in BookBrowser. If you turn on "BookBrowser should show full paths" in Sigil's preferences, it makes it easier to see the difference between the logical and physical file locations.

To quote from the epub 3.2 spec section 3.2:

Quote:
3.2 File and Directory Structure

The virtual file system for the OCF Abstract Container MUST have a single common Root Directory for all of the contents of the container.

The OCF Abstract Container MUST include a directory named META-INF that is a direct child of the container's Root Directory. Requirements for the contents of this directory are described in META-INF Directory.

The file name mimetype in the Root Directory is reserved for use by OCF ZIP Containers, as explained in OCF ZIP Container.

All other files within the OCF Abstract Container MAY be in any location descendant from the Root Directory, provided they are not within the META-INF directory.

Last edited by DNSB; 07-17-2021 at 07:13 PM.
DNSB is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Are there any iOS reader app that understands Calibre bookmarks? georgehuang Calibre 5 11-05-2020 10:54 PM
Announcing Qurika - a Beautiful 3D eBook Reader for Android and iOS! jacob_qurika Self-Promotions by Authors and Publishers 43 05-19-2019 07:43 PM
Ebook reader for both iOS and Android? Lparsons21 Reading and Management 8 01-10-2019 09:50 PM
[Android] Can any app directly read the Calibre database? SoulkeepHL Devices 2 01-10-2013 08:21 PM
[Android App] Best Android reader software for use with Calibre / Calibre Companion ellett Devices 11 12-16-2012 04:27 PM


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


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