I'm stuck. IPDF validator error says "File 'OEBPS/toc.ncx' could not be found" but I have the file toc.ncx sitting in the OEBPS folder. Any ideas why the validator might not be recognizing it?

If I can find this error, my epub will validate (that is, if I don't create another in the process :))!

This sounds buggy or perhaps you are viewing your directory incorrectly. First, are you using the latest validator? Are you validating the file as an epub2 file instead of an epub3? (You should make the files epub3 even if you are not using epub 3's advanced features). FYI, use of toc.ncx is deprecated starting in epub3. Epub 3 validation shouldn't even care if the toc.ncx file is there or not. (all it really cares about is that the assets in package.opf match what is in the directory).

See this FAQ:

Why does EPUB 3 allow NCX files, and do I need to include one? The NCX file is allowed for forwards compatibility purposes only. An EPUB 2 reading systems may open an EPUB 3 publication, but it will not be able to use the new navigation document format.

You can ignore the NCX file if your book won't render properly as EPUB 2 content, or if you aren't targeting cross-compatibility.

Your publication may still open on EPUB 2 reading systems even without an NCX. Some reading systems, like Adobe Digital Editions, will not provide navigation by table of contents but will open the publication.

UPDATE: Here's how to know whether your file is epub2 or epub3. Inside the unzipped epub file is a file called package.opf . Near the top you will see a declaration that looks like

<package xmlns="http://www.idpf.org/2007/opf" 
  xmlns:dc="http://purl.org/dc/elements/1.1/" 
  xmlns:dcterms="http://purl.org/dc/terms/" 
   version="3.0" xml:lang="en" unique-identifier="pub-identifier">

Here you will see that it says version="3.0". Here's what a 2.0 version looks like:

<package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="bookid">

(It doesn't have to look exactly like my package element for 3.0, but it should look similar).

  • I believe I am using the latest validator: validator.idpf.org ? How do I know if I'm validating as an epub2 or epub3? I added the toc.ncx because I am converting to a .mobi with Kindle Previewer 3 and uploading to KDP and I understand Amazon requires a toc.ncx for backward compatibility with old Kindle readers. – Carjo Jul 10 '17 at 18:29
  • Sorry I never saw your comment. Inside the unzipped epub file is a file called package.opf . I edited my comments above to explain. Check the PACKAGE element inside your package.opf file. – idiotprogrammer Aug 10 '17 at 18:18

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.