How to create a proper ePub Zip file on the Mac

I need to zip my iBook content with two critical requirements:

1) the first file must be the "mimetype" file (my ZipIt utility wants to reorder files, alpha, by name, rather than retaining the order that files are added into the archive).

2) that first file must NOT be compressed; the remaining files are to be compressed.

I did find one discussion on the web that says that the Applescript below will do it ... but I don't know applescript syntax and when I tried to create a script file it did not like anything that I substituted between the quotes.

=============================
zip -X0 "full path to new epub file" mimetype

and

zip -rDX9 "full path to new epub file" * -x "*.DS_Store" -x mimetype
=============================

Thanks in advance!!

Mini, Mac OS X (10.6.4), iPhones, iPods, iPad, MacBook Pro (10.5), PB G4 (10.4)

Posted on Jul 31, 2010 10:05 AM

Reply
8 replies

Jun 11, 2011 10:04 PM in response to keriah

Unfortunately, I don't believe the above zip commands are a complete solution. Files that possess a resource fork, but not a data fork, end up being copied to your EPUB without the necessary resource fork resulting in a zero length file. While this won't effect most books, it will definitely impact books that embed certain Mac fonts that choose to store all their data in the resource fork.


Looks like we need different options for the zip command.

Jun 12, 2011 10:23 AM in response to Tom Gewecke

Apple did eliminate them, yes, but the Mac OS (and most apps) still support the use of fonts that are contained in font suitcases. These include fonts such as Garamond, Lucida Sans, and Handwriting Dakota.


What I'm not sure of, however, is the ability of iOS on the iPad to handle fonts suitcases. Likewise, I have a feeling that the EPUB standard would frown upon .epub files that contain resource forks. Such files may (untested) work on Apple devices, but would almost assuredly trip up other eReaders.


The most likely solution to the problem I've encountered is to extract the font data from the resource forks and create new data fork only files that contain the fonts I wish to use.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to create a proper ePub Zip file on the Mac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.