Quirks of ePub
I had an experience this morning that made me realise how young ePub technology is in practice and that even large organisations are still working things out.
In February 2017 the National Library of Australia (NLA) began accepting ePub files for their Legal Deposit, which is:
'...the requirement for all Australian publications [with an ISBN] to be deposited with the National Library of Australia.' - NLA Website
The purpose is to have, on the public record, a copy of all registered publications in the country. It's a fantastic thing for cultural and archival purposes.
ePub is an international standard file format for eBooks. This is just another file format like .doc or .pdf. An ePub file has no inherent protection or, as it's called, Digital Rights Management (DRM). This lack of security means that an ePub format eBook can be opened and read by anyone wishing to do so without having to pay for it - then share it with all their friends.
To overcome this lack of security, what companies like Amazon did to monetise eBooks safely was to create a bubble of security around every file using their proprietary .mobi file format. This means only the purchaser can open that file on their own devices or software.
Back to the NLA...
When accepting ePub files for Legal Deposit, the National Library of Australia requires there to be no DRM on the ePub file. And quite right too. This freedom means that the Library fulfils its purpose of allowing visitors to access and view items in its collection free of charge. So your eBook can be read by anyone inside the library; they cannot take a copy of your eBook away with them.
What I found this morning was that when creating an eBook from the standard Adobe InDesign publishing software that the vast majority of publishers use, a tiny file called encryption.xml is usually packed inside the ePub file. The NLA system sees this as DRM and says your file is protected. What the NLA system is actually seeing is not DRM, but the encryption on the fonts used in the design of your eBook. The result is that they reject your ePub file.
To be able to upload your file to the NLA, you need to delete this little encryption file. I used the software eCanCrusher, which makes the process extremely simple. Even better would be if the NLA incorporated this little step into their file upload workflow for Legal Deposit.
Problem solved for the NLA ... perhaps with a little nerdy smugness.
How to fix the problem
To remove this file:
1. Change file type from .epub > .zip
2. Open .zip with UnArchiver (this is a free download on Mac)
3. Delete encryption.xml file
4. Compress (zip) the file up
5. Change file type back from .zip > .epub
6. Open epub in Sigil, save, and close (Sigil is a free download on Mac)