Mobileread
epubcheck, any software can pass its validiation check?
#71  Chang 06-02-2010, 03:52 AM
Maybe this goes under this thread..

I was wondering why my ePubs pass the epubcheck 1.0.5 validation but with some books ADE gives a warning "The document appears to have minor errors that might cause it to be displayed incorrectly". This doesn't even happen every time with same ePub, only sometimes.

Does someone know what's the logic behind ADE's warning because afaik it uses epubcheck validator also or am I totally wrong?
Reply 

#72  pdurrant 06-02-2010, 05:49 AM
Quote Chang
Maybe this goes under this thread..

I was wondering why my ePubs pass the epubcheck 1.0.5 validation but with some books ADE gives a warning "The document appears to have minor errors that might cause it to be displayed incorrectly". This doesn't even happen every time with same ePub, only sometimes.

Does someone know what's the logic behind ADE's warning because afaik it uses epubcheck validator also or am I totally wrong?
ADE does it's own validation in addition or possibly instead of using epubcheck.
Reply 

#73  Hamlet53 06-02-2010, 05:10 PM
Quote kovidgoyal
If at any time in the next 50 years it so happens that someone produces a widely used EPUB reader that fails to render a document because of a name attribute that is where it shouldn't be, I will print out this entire thread, and eat it.
Reminds me of the days when I worked for a company producing online courses and was doing all the html/JavaScript/ASP/DB coding and always went through hell trying to produce a product that would work with multiple versions of NN and IE.

Anyway I do try and run my files through epubcheck before uploading here and this seems to be a good place to ask a couple of questions that have been annoying me.

First I am running under Windows XP and would like to have the epubcheck output write to a file so that I have the written output and also can use a BAT file to run it instead of typing the whole command at a command prompt each time. The trouble is that a BAT file of:

Code
java -jar epubcheck-1.0.5.jar colomba.epub > verifyout.txt
produces the file verifyout.txt with content consisting only of:

Code
Epubcheck Version 1.0.5

Whereas the actual output should continue:

Code
ERROR: colomba.epub: length of first filename in archive must be 8, but was 9
Check finished with warnings or errors!
I always get this error, but have yet to figure out what it means.
Reply 

#74  pdurrant 06-02-2010, 05:34 PM
Quote Hamlet53
First I am running under Windows XP and would like to have the epubcheck output write to a file so that I have the written output and also can use a BAT file to run it instead of typing the whole command at a command prompt each time. The trouble is that a BAT file of:

Code
java -jar epubcheck-1.0.5.jar colomba.epub > verifyout.txt
produces the file verifyout.txt with content consisting only of:

Code
Epubcheck Version 1.0.5

Whereas the actual output should continue:

Code
ERROR: colomba.epub: length of first filename in archive must be 8, but was 9
Check finished with warnings or errors!
I always get this error, but have yet to figure out what it means.
I think that epubcheck writes error reports out to stderr rather than stdout, which would explain why you're only seeing the version statement.

The error means just what it says. The first file in the epub must be called mimetype, must not be compressed and must contain just the characters application/epub+zip.

Either you've mis-named the mimetype file, or you're not zipping your epub up correctly.
Reply 

#75  DaleDe 06-02-2010, 08:24 PM
Quote pdurrant
I think that epubcheck writes error reports out to stderr rather than stdout, which would explain why you're only seeing the version statement.

The error means just what it says. The first file in the epub must be called mimetype, must not be compressed and must contain just the characters application/epub+zip.

Either you've mis-named the mimetype file, or you're not zipping your epub up correctly.
Actually the error is cryptic since it would have been much more instructive to have said the first file must be named mimetype. If it is only checking the file name length then it is doing the user a disservice in passing a possibly bad archive that happens to have a filename that is 8 characters long but not mimetype.

Dale
Reply 

#76  dmapr 06-02-2010, 08:32 PM
Quote pdurrant
I think that epubcheck writes error reports out to stderr rather than stdout, which would explain why you're only seeing the version statement.
That's right. Fortunately, the remedy is simple. Instead of
Code
java -jar epubcheck-1.0.5.jar colomba.epub > verifyout.txt
one needs to say
Code
java -jar epubcheck-1.0.5.jar colomba.epub > verifyout.txt 2>&1
Reply 

#77  Hamlet53 06-02-2010, 09:14 PM
My thanks to all three of you that have responded to my query so far.

Dmapr: Yes, once I knew what the output was being directed to I found that solution. So that problem solved.

The file name I am using, mimetype, and its content, application/epub+zip, are correct so it must have something to do with how I am doing the compression. I have always used 7-Zip File Manager according to the following steps:

add mimetype to create the archive using Compression Level – Store

add OEBPS folder (containing all book content files) to archive using Compression Level – Normal

add META-INF folder (holds container.xml) to archive using Compression Level – Normal

Change file name to epub extension (from zip)

This has always produced an epub file readable as far as I am aware by all devices; personally verified Sony 900, Sony 505, Calibre, Firefox epub plugin, and Adobe reader.
This is why I have never worried over that message before, but if there is another suggestion for how to do the compression to produce a completely 'legit' file I have open eyes.
Reply 

#78  pdurrant 06-03-2010, 04:11 AM
Quote Hamlet53
This has always produced an epub file readable as far as I am aware by all devices; personally verified Sony 900, Sony 505, Calibre, Firefox epub plugin, and Adobe reader.
This is why I have never worried over that message before, but if there is another suggestion for how to do the compression to produce a completely 'legit' file I have open eyes.
Look at your epub with a hex editor. If bytes 0x1E to 0x39 are not mimetypeapplication/epub+zip then it's not a valid ePub file.
Reply 

#79  DaleDe 06-03-2010, 03:11 PM
Quote pdurrant
Look at your epub with a hex editor. If bytes 0x1E to 0x39 are not mimetypeapplication/epub+zip then it's not a valid ePub file.
Even with something like notepad the text above will show up clear on the first line. That is why it is first and not compressed.

Dale
Reply 

#80  Hamlet53 06-03-2010, 03:14 PM
So while I would have loved to be a writer, that was not my Muse. I became a Chemical Engineer instead [BS & PhD at Cal, go Bears] and had to make do with no Muse at all. I did learn the scientific experimental method though and thought I would apply it.

Someone recently uploaded an illustrated version of Kim by Kipling here that seemed likely to pass epubcheck.

Step 1. Download that epub file an run epubcheck on it. As expected no errors or warnings.

Step 2. Decompress this file using 7-Zip and then compress that back into an epub file using the procedure described in my previous post.

Step 3. Run epubcheck on the file from step 2. Result:

Code
 ERROR: Kim2.epub: length of first filename in archive must be 8, but was 9
Check finished with warnings or errors!
So that's interesting. How do others do the compression, with what program?

Note changed file names to Kim.epub & Kim2.epub
Reply 

 « First  « Prev Next »  Last »  (8/10)
Today's Posts | Search this Thread | Login | Register