Q:
We’re using subscription to convert PDF files into fixed ePub format.
After conversion we’re trying to upload the ePubs to iTune Connect, but always getting the following error message:
ERROR ITMS-5107: "[our ebook title].epub: Fixed-layout books must supply a landmarks" at Book (MZItmspBookPackage)
-----------------------------------------------------------------------
A:
Most, perhaps all, of our ToEpub customers do post-processing of the
generated EPUB content. While we generate fully complaint EPUB3 files
(and landmarks is optional in the spec), the output is not necessarily
ready for online stores. Especially with regards to meta data, such as
languages, author, title, bookmarks etc. This is because most PDF's
don't contain this information, many are missing title for example, and
there is no such thing as landmarks in PDF. We do convert the PDF
outline to EPUB toc, but our ToEpub wouldn't know what the landmarks
are. For example we have no way to know if there is a bibliography, and where
it begins.
Since the nav.xhtml file where the landmarks would go
is a XML file, you can use any sort of XML utility to edit it, and add your
landmarks, in your own XML post-processing step.
Steps:
1. If
you are using PDFNet, or DocPub CLI, you can generate the EPUB
unzipped/expanded format. Otherwise, if using online conversion, you
would simply unzip the .epub file
2. Post-processing: make XML changes to nav.xhtml
3. run EPUB check on the unzipped epub folder, with the following commands: "epubcheck.bat -mode exp -save epub_root_folder"
The last step will validate the epub, and then package it in the specific epub manner, as epub_root_folder.epub file.
Here
is the contents of the epubcheck.bat file that I personally use. Simply
put it with the epubcheck files that you can get here.
https://github.com/IDPF/epubcheck@ECHO OFF
java -jar %~dp0\epubcheck-3.0.jar %*
if errorlevel 1 (
echo Failure Reason Given is %errorlevel%
exit /b %errorlevel%
)
We may add landmarks, and other iBook store metadata requirements in
our conversion, later on, but as mentioned above, it would most likely
not be publisher ready and you would still need to post-process the nav.xhtml and package.opf files with a XML utility.