Expert publishing blog opinions are solely those of the blogger and not necessarily endorsed by DBW.
I recently received an email from a FlightDeck user who was wondering about some of the warning messages he was receiving in his EPUB file. The questions he asked touched on some important issues that I don’t think are commonly understood, so I thought it would be a good idea to share them here with my fellow ebook developers.
The first issue has to do with how InDesign CC handles the identifiers in an EPUB file. According to the EPUB specification, every EPUB is supposed to contain one “unambiguous identifier for the EPUB Publication.” The spec also says, “Multiple identifier elements are permitted, but only one can be marked as the Unique Identifier via the package element unique-identifier attribute.”
What this means is that you must have one element in the OPF Metadata section, and that identifier is defined as the official identifier of the EPUB file when it is linked to the element. For example, let’s look at the OPF of the Book of Texas, a test EPUB 3 file I often use as an example:
In this example, the unique-identifier attribute is pointing to the id of the <dc:identifier>, specifying that this is the official identifier of the EPUB file. I chose to make that identifier the ISBN because the ISBN is supposed to be how an EPUB file is tracked.
InDesign CC handles IDs differently, however. The program does include the EPUB’s ISBN as an identifier if you give it one, but it also includes a UUID, a unique number that is generated by InDesign during the file creation. This UUID is, unfortunately, marked as the unique-identifier instead of the ISBN.
Now, as far as I know, this use of the UUID does not cause any major issues with the retailers, and will not lead to your EPUB being rejected. But it does not make sense to identify an EPUB with an ID that is not the ISBN. Future-proofing your content is one of the most important steps you can take as a production specialist. Technology changes quickly, and well-built EPUBs are better suited to that changing environment. As you expand your retail presence, you will find that not all retailers are as forgiving as the big five are when it comes to metadata and file display, so issues like this one can come back to bite you later. Additionally, when the time comes to archive all your content in a content management system, having consistent, correct markup will make that ingestion process much easier.
The fix for this problem is to remove the UUID and make the ISBN the primary identifier, as seen in the example above.
However, this fix actually leads to another possible problem. When InDesign builds EPUB files with embedded fonts, it obfuscates those fonts to make them harder for people to extract and install. This obfuscation process uses the unique-identifier value as the key to the encryption, so if you do decide to change the ISBN as described above, the font obfuscation will break and the fonts will not work properly.
Fixing this second issue is also not too difficult—you just have to extract your EPUB, remove and replace the font files using your original TTF or OTF files, delete the encryption.xml file from the META-INF folder, and rebuild the EPUB. This removes the obfuscation and will allow you to keep your ISBN as the unique-identifier. A nice side benefit of this fix is that, because Kobo does not currently support font obfuscation, your EPUB file will display properly on Kobo devices. If you are concerned about removing the obfuscation, you can always try adding it back by following the IDPF spec, or you may be able to rely on the DRM applied by retailers as your protective layer.
I hope this technical discussion makes sense and is helpful to you as you strive to make high-quality ebooks.
To get all the ebook and digital publishing news you need every day in your inbox at 8:00 AM, sign up for the DBW Daily today!