I have an ePub that returns "mimetype entry missing or not the first in archive" error in epubcheck, even though the mimetype file is correctly placed.
How to fix that?
Ebooks Stack Exchange is a question and answer site for ebook publishers and readers. It only takes a minute to sign up.Sign up to join this community
This error can occur when the mimetype is compressed inside the epub zip file. What can be done is to create a zip file with only the mimetype file inside but with no compression.
You can do that with 7-Zip setting the
Compression level to
In Linux, you can also do that with the terminal command:
zip -0 file.epub mimetype
Then drag and drop the META-INF and OEBPS folders to the file.zip and change the extension to .epub, as usual. With the Linux terminal you can use this command line instead:
zip -9 -r file.epub META-INF OEBPS
zip -X0 ../myEPUB.epub mimetype
zip -9 -r ../myEPUB.epub META-INF OEBPS
another common error i was getting was extra characters in mimetype 'Mimetype file should only contain the string 'application/epub+zip' and should not be compressed' I found that my editor Geany was adding a newline when I saved the file and this caused an epubcheck error - a tweak in Geany's preferences fixed this error and epubcheck returned no errors
The trick is to SELECT the files in the order in which they are to be stacked.
For Windows users, do the following:
Send To > Compressed (zipped) folder.
7-zip sorts files by names