Tools, FAQ, Tutorials:
ERROR(PKG-005) - Mimetype Has Extra Field
How to fix the "ERROR(PKG-005) - The mimetype file has an extra field of length 28 ..." error?
✍: FYIcenter.com
When you validate a EPUB 2.0 package with EpubCheck, you may see
the following error:
C:\fyicenter> java -jar epubcheck.jar Error-Mimetype-Not-First-2.0.epub Validating using EPUB version 2.0.1 rules. ERROR(PKG-005): Error-Mimetype-Extra-Field-2.0.epub(-1,-1): The mimetype file has an extra field of length 28. The use of the extra field feature of the ZIP format is not permitted for the mimetype file. Check finished with errors Messages: 0 fatals / 1 error / 0 warnings / 0 infos EPUBCheck completed
Download Error-Mimetype-Extra-Field-2.0.epub. Unzip it on a Linux/Mac computer. You will see "mimetype" and other files restored with extra file attributes like /gid.
You can fix the error by re-build the EPUB package file by adding "mimetype" first without extra attributes with "zip -0X" commands on a Linex/Mac computer:
fyicenter$ zip -0X Hello-2.0.epub mimetype fyicenter$ zip -X Hello-2.0.epub META-INF fyicenter$ zip -X Hello-2.0.epub META-INF/container.xml fyicenter$ zip -X Hello-2.0.epub package.opf fyicenter$ zip -X Hello-2.0.epub navigation.xhmtl fyicenter$ zip -X Hello-2.0.epub content.xhtml
Note that "zip -0X" command means no compression and no extra attributes.
⇒ ERROR(OPF-030) - unique-identifier Not Found
⇐ ERROR(PKG-006) - Mimetype Not the First
2022-11-04, 1105🔥, 0💬
Popular Posts:
What is the Azure AD v1.0 OpenID Metadata Document? Azure AD v1.0 OpenID Metadata Document is an onl...
How To Avoid the Undefined Index Error in PHP? If you don't want your PHP page to give out errors as...
How to start Docker Daemon, "dockerd", on CentOS systems? If you have installed Docker on your CentO...
How to use the "set-backend-service" Policy Statement for an Azure API service operation? The "set-b...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...