maher9178 / ebookdroid

Automatically exported from code.google.com/p/ebookdroid
0 stars 0 forks source link

Some epub files are not recognised #634

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

What steps will reproduce the problem?
1.Open the attached epub file from a file explorer or from the library
2.
3.

What is the expected output?
Book should open. Works fine in FBreader.

What do you see instead?
Error dialog: java.io.IOException: no EPUB mimetype defined

What version of the product are you using?
2.0.8

On what operating system?
Android

What device are you using?
Acer Iconia A500

Please provide any additional information below.
About half my ebooks have this problem. Half load fine. This is the only issue 
stopping me use ebookdroid as my standard reader for all formats.

Original issue reported on code.google.com by fungible...@gmail.com on 23 Oct 2013 at 5:38

Attachments:

GoogleCodeExporter commented 8 years ago
http://en.m.wikipedia.org/wiki/EPUB

Provided file has invalid structure. Maybe somewhen we add support for such 
files, but technically it's not a epub.

Original comment by Andrei.K...@gmail.com on 23 Oct 2013 at 7:18

GoogleCodeExporter commented 8 years ago
Can you please show me exactly what is invalid about the structure of
these files so that I can repair them? I have hundreds of such files
so I could create a script to fix them all as a batch job and publish
it on the web for other users with the same problem.

Otherwise I will not be able to use ebookdroid, which iswould be a
shame as it is superior to other readers I have tried.

Original comment by fungible...@gmail.com on 23 Oct 2013 at 9:23

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Open Container Format 2.0.1

An EPUB file is a group of files that conform to the OPS/OPF standards and are 
wrapped in a ZIP file. The OCF specifies how to organize these files in the 
ZIP, and defines two additional files that must be included.

The mimetype file must be a text document in ASCII that contains the string 
application/epub+zip. It must also be uncompressed, unencrypted, and the first 
file in the ZIP archive. This file provides a more reliable way for 
applications to identify the mimetype of the file than just the .epub extension.

Also, there must be a folder named META-INF, which contains the required file 
container.xml. This XML file points to the file defining the contents of the 
book. This is the OPF file, though additional alternative rootfile elements are 
allowed.

Apart from mimetype and META-INF/container.xml, the other files (OPF, NCX, 
XHTML, CSS and images files) are traditionally put in a directory named OEBPS.

An example file structure:

--ZIP Container--
mimetype
META-INF/
  container.xml
OEBPS/
  content.opf
  chapter1.xhtml
  ch1-pic.png
  css/
    style.css
    myfont.otf
An example container.xml, given the above file structure:

<?xml version="1.0" encoding="UTF-8" ?>
<container version="1.0" 
xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
  <rootfiles>
    <rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"/>
  </rootfiles>
</container>

Original comment by Andrei.K...@gmail.com on 24 Oct 2013 at 6:34

GoogleCodeExporter commented 8 years ago
From your file I understand that it was originated from 
http://www.feedbooks.com/book/398 
I went to that site and download their copy of your book. Is has correct 
packaging.

So I can suggest you to use normal book sources.

Original comment by Andrei.K...@gmail.com on 24 Oct 2013 at 8:15