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.

What's ePub?

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)
https://longuevillemedia.com.au/blog/2017/5/11/quirks-of-epub
longuevillemedia.com.au
crawl=CC-MAIN-2019-30
66329
application/http; msgtype=response
sha1:ZLUXU26CLMACDJ4LFJJSSZ5HTCXWHWJR
<urn:uuid:6b5c9073-1b28-44d0-804b-3a5600ffe108>
2019-07-18T19:47:24Z
198.49.23.145
text/html
sha1:DUZNKLWSYHSBKIMNZSJVNE6S2AHDMB7T
<urn:uuid:f3c1b029-be25-45e3-ba59-9ebcedfe0f4f>
https://longuevillemedia.com.au/blog/2017/5/11/quirks-of-epub
response
<urn:uuid:edbf7251-6330-48bf-8f17-7e91fc86597a>
isPartOf: CC-MAIN-2019-30
publisher: Common Crawl
description: Wide crawl of the web for July 2019
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-109-164-24.ec2.internal
software: Apache Nutch 1.15 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.1-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: http://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/