PHP Classes

epubcheck I/O error: error in opening zip file

Recommend this page to a friend!

      EPub  >  All threads  >  epubcheck I/O error: error in...  >  (Un) Subscribe thread alerts  
Subject:epubcheck I/O error: error in...
Summary:epubcheck I/O error: error in opening zip file
Messages:8
Author:ann castro
Date:2011-01-08 15:51:30
Update:2011-01-08 17:28:32
 

  1. epubcheck I/O error: error in...   Reply   Report abuse  
Picture of ann castro ann castro - 2011-01-08 15:51:30
Hi,
epubcheck comes back with the following error message: I/O error: error in opening zip file

A search on google (hardly any entries on this problem!) brought me here. Someone here has had the same problem. It got fixed and I would like to know how, as that is not stated in the thread.

Can anyone help me, please.

Thanks,
Ann.

  2. Re: epubcheck I/O error: error in...   Reply   Report abuse  
Picture of Asbjorn Grandt Asbjorn Grandt - 2011-01-08 15:59:09 - In reply to message 1 from ann castro
Can you please send me the Epub file in question on avg@grandt.com

Was it created with this Epub class?
If not, where and how was it made?

Best Regards

  3. Re: epubcheck I/O error: error in...   Reply   Report abuse  
Picture of ann castro ann castro - 2011-01-08 16:20:53 - In reply to message 2 from Asbjorn Grandt
Hi,

Thank you so much for your quick answer.

No, it wasn't created using this class. Did not know about you until you came up on a google search re. this problem.

The documents was desinged with the indesign epub export and some massive (and I mean MASSIVE) clean up afterwards.

I backtracked now to see what caused it and it seems as if I found the culprit:

html, body, p { widows: 0 !important; orphans: 0 !important;
}

I do not know why, but if I delete it, it works again.

I have now started to add them back in individually. With these two it still is working.

p {
widows: 0;
orphans: 0;
}

div {
widows: 0;
orphans: 0;
}

I mean working insofar as I did not give an error message. No clue if it actually worked on getting rid of those dratted single lines on a page.

Any thoughts on this?

Thanks,
Ann.

  4. Re: epubcheck I/O error: error in...   Reply   Report abuse  
Picture of Asbjorn Grandt Asbjorn Grandt - 2011-01-08 16:41:09 - In reply to message 3 from ann castro
The error from epubcheck suggest that there is superfluous data or errors in the zip file structure. It had nothing to do with the HTML files making up the chapters in an Epub itself.

Can you take the epub file with the errors, copy it, and rename it to .zip and unpack it with WinZip or WinRar?

If you have a Hex editor the epub file must start with "PK.." or Hex "50 4b 03 04" and most likely end with 4 or more null characters (hex 00), though that is not a requirement. But if it contains regular text at the end, you have a problem.

When it comes to styling, I tend to advise people to use a conservative approach, simple is better. Most readers are relatively simple devices and don't do very advanced styling, and the best result from Epub files generally comes if the device is allowed to flow the text as simply as possible.

This is the content of the css file I often use:
body {
font-family: serif;
}

p {
margin-top: 0px;
margin-bottom: 0.5ex;
text-indent: 1em;
text-align: justify;
}

h1, h2, h3 {
page-break-after: avoid;
font-style: italic;
text-align: center;
background-color: #6b879c;
color: white;
width: 100%;
margin-bottom: 2px;
}

h2 {
margin-top: -2px;
margin-bottom: 2px;
}

h4 {
margin-top: 1.5ex;
margin-bottom: 1.5ex;
font-style: italic;
}

.center {
text-align: center;
}

  5. Re: epubcheck I/O error: error in...   Reply   Report abuse  
Picture of ann castro ann castro - 2011-01-08 16:55:18 - In reply to message 4 from Asbjorn Grandt
Hi,

Thanks. The print book from which I am converting this is extremely layout intensive:
annsworld.com/wp-content/uploads/20 ...

So I've gotten rid of the background, double columns etc. I did end up inserting the tables as photos as they kept messing up. But it still has a lot of photos. Plus a lot of paragraphs fromt he different training steps. And that's how I end up with all the widows and orphans.

I have used in the headers:
page-break-inside: avoid;
page-break-after:avoid;

and I have defined
div.together {
display: inline-block;
page-break-inside: avoid;
}
p.together {
display: inline-block;
page-break-inside: avoid;
}
in an attempt to keep photos and captions together.

Neither are working so well. Same for the widowns and orphans commands - just not working.

Don't know why. I am testing on an ipad. Maybe that has something to do with it.

I am getting close to the point of saying THWI and uploading it anyways. (I know, bad attitude <smirk>).

I have googled up and down and what seems to be working for others does not seem to work for me. Ah well. :(

BTW do you know of a free Hex editor. Never tried one, and frankly do not even know what you are talking about there. :-), but would be interested to have a look. Learn s.th. new. :-D

Thanks and take care,
Ann.

  6. Re: epubcheck I/O error: error in...   Reply   Report abuse  
Picture of ann castro ann castro - 2011-01-08 17:03:41 - In reply to message 5 from ann castro
ps. I am trying to mail you the file - 25 MB... it's chugging away. ...

  7. Re: epubcheck I/O error: error in...   Reply   Report abuse  
Picture of Asbjorn Grandt Asbjorn Grandt - 2011-01-08 17:14:07 - In reply to message 6 from ann castro
25 MB for an Epub is quite...large, most full length books rarely clock in at 1 MB :)

Are they error you get from epubcheck still the IO error or corrupt zip file?

As for the hex editor, I'm just using the free HexEdit (appropriate name if there ever was one :) )
physics.ohio-state.edu/~prewett/hex ...


  8. Re: epubcheck I/O error: error in...   Reply   Report abuse  
Picture of ann castro ann castro - 2011-01-08 17:28:33 - In reply to message 7 from Asbjorn Grandt
LOL ... an appropriate name, indeed. Thanks.

Without the widows and orphans statement the file checks out fine. I am stumped though why that statement caused such a massive failure of the whole file.

So the file works it just has those ugly single lines at the top and bottoms of some pages. :-(

Ann.