PKG-007
Updated:
EPUBCheck PKG-007 is an error message: “The content of the mimetype file must be the string "application/epub+zip"….” The mimetype file must contain exactly the text application/epub+zip, with nothing before or after it.
The official message
The content of the mimetype file must be the string "application/epub+zip"%1$s
Variants
whitespace: with no whitespace or newline.
- Default severity
- Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
- EPUBCheck version
- 5.4.0
%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.
Typical causes
- A trailing newline or space added by a text editor.
- A different value, such as a typo or another media type.
How to fix it
- Recreate the file without a newline, for example with
printf 'application/epub+zip' > mimetype, then rebuild the archive with mimetype first: Rebuild the archive with the mimetype file first and stored uncompressed, for example from the folder that contains the book:zip -X0 book.epub mimetypeand thenzip -rX9 book.epub META-INF OEBPS(use your own folder names).
Terms used here
Other PKG messages
PKG-006Mimetype file entry is missing or is not the first file in the archive.PKG-005The mimetype file has an extra field of length …. The use of the extra field feature of the ZIP format is not permitted for the mimetype file.PKG-009The file name "…" contains characters that are not allowed in OCF file names: ….PKG-004Corrupted EPUB ZIP header.PKG-010The file name "…" contains spaces, which may create interoperability issues with older reading systems.PKG-003Unable to read EPUB file header. This is likely a corrupted EPUB file.
Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EPUBLab.