View Full Version : Epub issues with Epubcheck


ematte
10-19-2010, 02:18 PM
I've been using a combination of InDesign and Dreamweaver to output Epubs and get the following error from Epubcheck.

ERROR: test book: length of first filename in archive must be 8, but was 22

Is anyone familiar with what is the filename in question and where I might change it? I've loaded the file on my Ipad and everything looks fine. I also convert it to Mobi in Calibre and it also loads fine on my Kindle.

I also always get an error message with Epubcheck regarding the "date". If I delete the date from the content file, it goes away. Exactly where do I input the date to eliminate this problem.

Thanks

Steven Lake
10-19-2010, 05:13 PM
Which "date" line are you talking about? I have two lines in my epub files, only because that's the way I was taught to do it. Here's the two I have.

<meta content="2010-05-15T13:41:36" name="calibre:timestamp"/>
<dc:date>2010-05-15 00:00:00-04:00</dc:date>

As for the first "filename", that's always going to be the "content.opf" file, as that's the file which tells the program reading it where to find everything and how it's labeled. As for the "must be 8, but was 22", I have no bleeding idea what that is. Is it 8kb vs 22kb, or 8 lines or what? I'm sorta wondering if this "epubcheck" needs some work on it. If nothing else the coder didn't do his work right in coding his error messages.

pholy
10-19-2010, 06:25 PM
I got that error when I let zip include the directory information. Now I use the following two lines in a terminal shell:

zip book-file.epub -DX0 mimetype
zip book-file.epub -rDX9 *

That assumes that I'm creating the epub in the directory containing all the files.

K-Thom
10-19-2010, 09:08 PM
@ ematte - Try it that way:

Install Sigil (http://code.google.com/p/sigil/), open your ePub file with it and save it right away without doing anything else. Then run ePubcheck again.

Saved a lot of "date trouble" for me, might also help with your 22 character length problem.

James_Wilde
10-20-2010, 04:02 AM
I've been using a combination of InDesign and Dreamweaver to output Epubs and get the following error from Epubcheck.

ERROR: test book: length of first filename in archive must be 8, but was 22

Thanks

The first file in the epub zipfile must be called "mimetype", with no file type (txt, doc etc) which is 8 characters. This file must also be uncompressed. It informs the system that the rest of the file is an epub.

The content of this file is one line:

application/epub+zip

Absolutely nothing else.

Jellby
10-20-2010, 07:03 AM
I also always get an error message with Epubcheck regarding the "date". If I delete the date from the content file, it goes away. Exactly where do I input the date to eliminate this problem.

That could be a case of this bug (http://code.google.com/p/epubcheck/issues/detail?id=56). It has been fixed in version 1.1, which is a release candidate now.

CraigAtk
10-28-2010, 01:40 PM
The first file in the epub zipfile must be called "mimetype", with no file type (txt, doc etc) which is 8 characters. This file must also be uncompressed. It informs the system that the rest of the file is an epub.

The content of this file is one line:

application/epub+zip

Absolutely nothing else.

James_Wilde is absolutely correct about the manifest file. For more details on the required structure of the epub file, check out http://en.wikipedia.org/wiki/EPUB#OEBPS_Container_Format_1.0

GeoffC
10-28-2010, 02:05 PM
:hatsoff: ematte & CraigAtk

Welcome to mobileread ....

Steven Lake
10-28-2010, 10:33 PM
Yeah, I ran a file I had through epubcheck and was shocked to realize that silly old me forgot the stupid mimetype file. Thankfully I only did that in one file. ^_^;;

ematte
10-29-2010, 08:39 AM
Thanks everyone. I believe that covered all my issues.

ematte
10-29-2010, 08:43 AM
I forgot one thing. Even though epubcheck did not validate my file, I was still able to load it on my Ipad and Kindle with no apparent issues. What's up with that? Is Epubcheck too critical in it's validation?

Steven Lake
10-29-2010, 09:12 AM
epubcheck is designed for 100% adherence to standard. Most device makers however know that not everyone is going to be able to be 100% adherent. So they develop their devices by the percentage rule. Some allow epubs that are only 70% compliant while others require 95%. Some even go so far as demanding 100% adherence on the core elements while overlooking files and things that don't affect navigation and display.

Adjust
10-29-2010, 07:01 PM
I forgot one thing. Even though epubcheck did not validate my file, I was still able to load it on my Ipad and Kindle with no apparent issues. What's up with that? Is Epubcheck too critical in it's validation?

Try looking at it in Adobe Digital editions (free download) I think this program is the strictest one... If there is something wrong with your epub you will see it here

Steven Lake
10-30-2010, 08:48 AM
(goes to look at Adobe Digital editions) Argh. I hate Adobe. They have no love for Linux. They told me to go flog myself and get a "real" OS. So I guess it's back to loading this with Wine instead. *sigh* When is Adobe going to learn that there's more than just Apple and Microsoft in this world? But at least I'll give it a try and see how it does.