Skip to content
Tingle Press

in Production

Validating an ebook before it ships

An ebook can look fine in one app, fail in another and be rejected on upload. Validation catches most of that before readers do.

An ebook can look perfect in the app it was tested in and still be broken. Some problems stop a retailer accepting the file; others only appear on certain devices or for certain readers. Validation is the step that catches as many of them as possible before the book reaches anyone.

What validation means

Validation checks a file against the rules of its format. For EPUB, that means checking that the package is correctly structured, that every file it refers to exists, that the markup is valid, that the required metadata is present, and that everything follows the EPUB specification.

The standard tool is EPUBCheck, a free, open-source validator. Many retailers and distributors run it, or something equivalent, on files they receive, so a file that passes EPUBCheck is much less likely to be rejected.

EPUBCheck runs from the command line, and it is also built into a number of ebook production tools and available through graphical front ends.

Reading the results

EPUBCheck reports problems at different levels of severity, from fatal errors and errors down to warnings and informational messages. Errors mean the file does not conform to the specification and should be fixed. Warnings point to things that are permitted but may cause trouble, and are worth reading even if not all need action.

Typical problems include files that are referenced but missing, or present but not listed in the package document; invalid markup, such as unclosed tags or elements in the wrong place; broken links between chapters or from the table of contents; missing or malformed metadata; and images or fonts in formats the specification does not support.

Each message names the file concerned, and often the line, which makes most of them straightforward to fix.

Validation is not the whole test

Passing EPUBCheck means the file conforms to the specification. It does not mean the book looks right, reads well or behaves well on every device.

After validation, the file should be opened on several reading systems: at least a dedicated e-reader, a phone app and a tablet app, and ideally more than one make of each. Check the table of contents, links, images, special characters and tables, how the book looks at larger and smaller text sizes, and how it looks in a dark reading mode. Styles that work in one app can be ignored or overridden in another.

It is also worth reading the whole book through on at least one device. Conversion errors such as missing paragraphs, lost italics or misplaced images can pass every automated check.

Accessibility and repeat checks

EPUBCheck checks conformance, not accessibility. A separate accessibility checker, such as Ace by DAISY, examines a file for problems like images without text descriptions, a missing language declaration, a confused heading structure or absent accessibility metadata. It is worth running as a matter of course.

Validate every time the file changes, not just once. A small correction can introduce a new error, and a retailer will check the updated file again when it is uploaded.

Validation is a small step. It saves a rejected upload, a broken book on a reader's device and the time spent finding out why.