Wanted to do a quick post to help those other indie publishers out there who want to upload to iTunes, but are having difficulties (on a mac, sorry Windows friends).
There are plenty of good resources through google that will tell you how to format your work for ebook publishing, whether that be Kindle, Nook, iTunes, or whomever. And for the most part, the formatting is all the same. You get rid of tabs, font specifics, excessive returns, insert page breaks, build a table of contents, etc. Uploading to Kindle and Nook was a piece of cake. But Apple made things a headache. First getting approved for their publishing software, then downloading, then entering all the information in, all of that was easy enough. But when I clicked upload, I received a list of errors, like these:
“Error ITMS-9000: “Hallowtide_-_Karl_Pfeiffer.epub: Hallowtide_iTunes_Edition_split_000.htm(12): attribute “vlink” not allowed here; expected attribute “class”, “dir”, “id”, “Style”, “title” or “xml:lang”. This error occurs 47 times.” At Book (MZItmspBookPackage)”
or “ERROR ITMS-9000: “Hallowtide_-_Karl_Pfeiffer.epub: Hallowtide_iTunes_Edition_split_000.htm(13): element “apan” not allowed here; expected element “address”, “blockquote”, “del”, “div”, “dl”, “h1”, “h2”, “h3”, “h4”, “h5”, “h6”, “hr”, “ins”, “noscript”, “ns:svg”, “ol”, “p”, “pre”, “script”, “table” or “ul” (with xmlns:ns=”http://www.w3.org/2000/svg”). This error occurs 18 times.” at book (MZItmspBookPackage).
And so on.
The process of converting your book to ebook is essentially writing it in code the way you write a website in code. eReaders read the code the way that a browser reads website code, as far as I know. You start in word, you try to strip out all the bad formatting, save it as an html file, and then use a program to convert that file into the .mobi or .epub file as you want it for whatever store you’re using. The converter I used was Calibre, which was freaking awesome software, that worked in each case to give me a pretty, customized ebook that I could then upload and publish. Except for the one case: Apple.
The code that Word puts out is sloppy and filled with potentially problematic clutter. Anyone who knows anything about code hates word-published html. It was good enough for all devices but Apple it seems. After an hour or two of frantic research, the first Error that Apple called me on was for having a file name “Hallowtide-Karl Pfeiffer”, to which, anyone with coding background knows that spaces are bad, and should have an underscore, “_” instead. But digging into every error I got was a mess, so I called a gifted programmer friend and asked if he might be able to translate the errors and make the appropriate changes in the document.
This being my gifted programmer friend, he instead designed a program that would strip out all of Word’s bullshit code and make it pretty for Apple. And it worked.
So I’d like to share it with you if you’re having the same problem and might’ve found this post by a google search.
First of all, start in Word. Format the file according to traditional epub specifications. Then export as HTM.
Download Calibre here. Check up on the how to use Calibre, then export your book as an epub file for ipads.
Then click here to download the Fixit package that my programmer buddy made. (It’s not a virus, relax, it’s cool to open it).
(Edit: It’s come to my attention that due to the writing of the program, your file will need to be named “Hallowtide.epub” (no quotes) in order for the software to kick it out properly. It was the name of my first novel and I’m too passive/lazy to have my buddy tweak the program.)
Put your “Hallowtide.Epub” file in the same file as fixer/jar and fix_ebook.sh, the “Fixit” folder that was in the zip is easiest.
Open the program Terminal (if you’re on a mac), type the command:
cd “/Users/Your Computer Name/Desktop/Fixit” (Or the sequence of folders to wherever your folder downloaded to, or to where you moved it)
Followed by the commands:
chmod +x fix_ebook.sh
That should poop out a new cleaned up ebook that should be ready to be uploaded to Apple without problems. If that doesn’t work, in terminal, run:
./make_fix_ebook_2 (you may have to tweak security settings on your mac)
Then do whatever ./make_fix_ebook_2 told you to do.
I’ve run into some problems on later files, particularly if you have a lot of image files in your book. But past what I’ve got here, if it doesn’t help you, I can’t say I’m good for any more answers, not being a programmer. If you are a programmer and you’d like to download these files and fiddle with them to make a cleaner, smoother, program that can clean up the clutter from Word, you’re absolutely welcome to. Share this on forums if you’re having similar problems, or know of anyone else having a similar problem.
Karl Pfeiffer is the author of the novel Hallowtide. He was cast on and later won the first season of the pilot reality series Ghost Hunters Academy, and went on to work with the Ghost Hunters International team on the same network. He now works at the Stanley Hotel, leading the public weekend ghost hunts, writes for the TAPS Paramagazine, contributes to the Paranormal Pop Culture blog, and travels the nation. More can be found at KarlPfeiffer.com