A few months ago Smashwords started accepting epub files. Since then I’ve seen lots of authors having issues with their epub files. Even though the ebooks look 100% ok in their ereaders, they’re getting rejections from Smashwords filled with lots of weird sounding errors. The reason for this is because Smashwords wants your epub to pass their validator. Different validators check for different things. The one Smashwords says to use in the troubleshooting guide is the IDPF validator.
What the validator does is check the code that is within the ebook. It does this to ensure that your file will be readable on a wider range of ereaders. If the code isn’t written according to what the validator expects to see, then it’ll show an error. Even though the error may not be visible to you.
When you upload your epub file, if there are errors, you’ll see lots of lines of what looks like garbled mess. It can be difficult to figure out what those lines mean. In order to fix the errors you’ll need an epub editor like Sigil . And it’s free so that makes it even better. There are others available, like Jutoh, you can use, but Jutoh isn’t free.
So now you have your epub uploaded into the validator. Here’s what it looks like when there’s errors:
errors screen in validator
You’re probably ready to run away after looking at that. It doesn’t seem to make much sense. This is why you have to have an epub editor to fix all this mess. I’ll try to explain what each box stands for and where to find it within the file. The first box is kind of obvious it says error which means there’s something wrong in that spot. The second box tells you which file the error is in. Often times epub files are a series of HTM files so you need to look at the title in the second box to know which file to open. If you look at the above image you’ll see, 001.htm. That is the file you need to look for in your epub editor.
This is what you’ll see in Sigil (below image). If you look on the left hand side, you can see all the files within the epub are listed on the left hand side. Double click .001.htm to open it
epub file being edited with Sigil
Once you double click on the file, it will open in the center of the screen. In the image above, you can see the titlepage.xhtml is open. You will also see numbers on the left hand side, 1,2,3,4,5 etc, those are the line numbers. That is what the third box in the errors screen is referring to. From the above errors screen, you need to find line 12 in file 001.htm.
The last box tells you what the error is. In the above example, the error is regarding the attribute vlink. Now this type of line in your HTML code won’t necessarily make an issue when you open it in your ereader, but it’s been deprecated in HTML 4.0 and is not recommended for use. That is the reason it’s flagged as an error. Therefore you need to update it with more current code. If you look within the error, it tells you what it expected to find so you just need to rewrite the code for that.
I realize this is a lot of technicalese (yes that’s a word). And it can be quite confusing especially if you’re not that familiar with HTML codes or using an epub editor. Most of the errors you encounter are going to be easy fixes. You can even Google the error and often times will find the solution. It just takes a bit of patience and time to work through and fix all of the errors.
I plan on doing a couple more posts on epub for Smashwords explaining what the common errors are and how to fix them. If you have specific questions, you can email them to me or leave a comment.
I can’t promise to address every question, but I will do my best to address as many as I can. Clients keep me busy these days so I don’t have as much time as I did before to do tutorials. Although I do hope to do at least one a week from now on.