Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2009, 10:22 AM   #16
GijsZePa
Junior Member
GijsZePa began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2009
Device: None
Quote:
Originally Posted by pdurrant View Post
Post a sample ePub.
The real .epub is 40 + MB, this is just a subset. But the mimetype file is the problem.

Thanks !

BTW..don't shoot me because of the layout...I'm just the coder

Martin
Attached Files
File Type: epub test.epub (838.1 KB, 384 views)
GijsZePa is offline   Reply With Quote
Old 11-23-2009, 01:12 PM   #17
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by GijsZePa View Post
The real .epub is 40 + MB, this is just a subset. But the mimetype file is the problem.
That mimetype includes a line termination (DOS style), that is an error, the mimetype file should not have any line-end, it should be just 20 bytes long (yours is 22).
Jellby is offline   Reply With Quote
Advert
Old 11-23-2009, 03:31 PM   #18
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 71,491
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
That's not his problem. If I unzip and then re-zip his file, it passes epubcheck.

The problem is the zip format.

If you look at his file with a hex editor, it should have

application/epub+zip

at bytes 0x26 to 0x3A, immediately following the mimetype filename.

In his file the mimetype filename is in the right place, but the file contents doesn't immediately follow it.

I've attached the working ePub. I don't know enough about the zip format to say exactly what's one wrong when zipping his files, but something has.

Quote:
Originally Posted by Jellby View Post
That mimetype includes a line termination (DOS style), that is an error, the mimetype file should not have any line-end, it should be just 20 bytes long (yours is 22).
Attached Files
File Type: epub test2.epub (943.9 KB, 444 views)
pdurrant is offline   Reply With Quote
Old 11-23-2009, 04:43 PM   #19
GijsZePa
Junior Member
GijsZePa began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2009
Device: None
Thanks for your investigation. It's driving me nuts.
I'm gonna post a question in the ionic zip library group (the guys who build the .net zip dll) to get some answers...

I still want to automate this task without using some thirdparty command line ziptools..

Regards !!

Martin
GijsZePa is offline   Reply With Quote
Old 11-24-2009, 04:49 AM   #20
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by pdurrant View Post
That's not his problem. If I unzip and then re-zip his file, it passes epubcheck.

The problem is the zip format.
Yes, you are right. Running "zip -Tv" said:

zip info: mimetype has 36 bytes of extra data
zip info: META-INF/ has 36 bytes of extra data
zip info: META-INF/container.xml has 36 bytes of extra data
zip info: OPS/ has 36 bytes of extra data
zip info: OPS/011252A.png has 36 bytes of extra data
zip info: OPS/011252B.png has 36 bytes of extra data
[...]

though the final test result is OK. Ark says the mimetype file is stored with no compression, so that part is OK too.
Jellby is offline   Reply With Quote
Advert
Old 11-24-2009, 06:30 AM   #21
GijsZePa
Junior Member
GijsZePa began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2009
Device: None
Thank you all for pointing me into the right direction:

The problem is solved with the help of the programmer of the DotNet Zip Library.

"By default, Zip entries created by DotNetZip will include extra data, for the timestamp on the file. This data will appear in the zip file immediately after the filename, and immediately before the file content. Normally this is tolerated by zip tools that read the files. In some cases it is not. To turn off the timestamp, set EmitTimesInWindowsFormatWhenSaving to false, on the ZipEntry. This would be (e.EmitTimesInWindowsFormatWhenSaving = false"

That will eliminate the extra data between the filename and the file content.
"

It worked and the .epub is validated OK ...

Thank you all very much for helping me solve the puzzle !

Martin
GijsZePa is offline   Reply With Quote
Old 12-02-2009, 10:09 AM   #22
Amit Dey
Junior Member
Amit Dey began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Dec 2009
Device: none
i have got some error container.xml missing in the meta-inf and also mimetype is miss
Amit Dey is offline   Reply With Quote
Old 01-22-2010, 01:14 AM   #23
subhash4d1
Junior Member
subhash4d1 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2008
Device: Kindle, SONY, MOBI, PALM, ePUB
Cool Solution of mimetype error in ePub.

First make a zip of mimetype file then add ur all files/folders in the zip. Or provide me your sample ePub in "hello_subhash@yahoo.com". I will fix the error then you can compare zipping properties and implement.

Quote:
Originally Posted by Jellby View Post
As the error says, the mimetype file has to be the first file in the zip, and must be stored without compression.

What I do (on linux) is create the zip/epub file in two steps. First create the zip only with mimetype, without compression:

Code:
zip -0 file.epub mimetype
Then add the rest of the files with maximum compression:

Code:
zip -9 -r file.epub META-INF OEBPS
You can probably do the same with Winzip or similar.
subhash4d1 is offline   Reply With Quote
Old 11-16-2013, 07:16 AM   #24
Lucas Malor
Pain in the arse
Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.Lucas Malor will give the Devil his due.
 
Lucas Malor's Avatar
 
Posts: 758
Karma: 77856
Join Date: Apr 2013
Device: Kobo Aura One, Kindle 4
Excuse me for necromancy, I've found this article googling and it solved my problem

A more simple way to zip the epub is:

Code:
zip -r -X file.epub mimetype *
or better

Code:
zip -X file.epub mimetype
zip -r file.epub * -x "mimetype"

Last edited by Lucas Malor; 11-16-2013 at 07:25 AM.
Lucas Malor is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
attribute "scheme" from namespace error in epubcheck 1.0.5 thunderune ePub 15 06-30-2011 10:57 AM
epub date error fails epubcheck 1.05 dkata Calibre 2 09-13-2010 04:21 AM
epub et mimetype merlinetmoi E-Books 4 09-10-2010 01:20 AM
Web-based epubcheck upgraded to epubcheck 1.0.5 kjk ePub 4 02-09-2010 09:53 PM
"E-books" Menu: missing entry for epub book uploads ?!? cklammer Feedback 0 12-06-2009 06:28 AM


All times are GMT -4. The time now is 03:47 AM.


MobileRead.com is a privately owned, operated and funded community.