I've got an EPUB3 file and mupdf fails with: error: EPUB is locked by DRM mupdf: error: cannot open document Looking into the EPUB zip file I can see that the only files encrypted are the fonts, not really necessary for displaying stuff. Could it be possible to not fail when a META-INF/encryption.xml if it only mentions trivial stuff like pictures and fonts? Or add a prompt or a command line switch to ignore that file? Thank you.
Ah seems that the fonts are just obfuscated, not even encrypted: http://www.idpf.org/epub/20/spec/FontManglingSpec.html
I can reproduce this bug with one of my ePub files, too. It's a matter of encrypted font files, which should not be strictly required in my opinion.
Created attachment 14898 [details] essentialism.epub
I have the same issue with serveral epub files. If I remove META-INF/encryption.xml file in the epub file, mupdf opens the file fine. Otherwise, it gives the error. Please fix. thanks
Hi, I use this shell function to workaround it: # to make mupdf open some DeDRMed epubs function dedrm(){ declare css=page_styles.css zip -d "$1" META-INF/encryption.xml zip -d "$1" fonts/\* # remove references to fonts/* in the $css file. unzip -qc "$1" $css | sed '/@font-face/{:a /}/d; N; ba}' > $css zip "$1" $css && rm $css } I hope you find it useful.
Created attachment 21832 [details] A sample META-INF/encryption.xml with font XOR obfuscation.
The status of this bug should be changed to Confirmed; I'm also suffering. Those giving away this free EPUB are not aware there is any DRM or encryption involved and that is certainly not their intent. The META-INF/encryption.xml has just been attached and clearly shows it is only fonts which are encrypted and all with the http://www.idpf.org/2008/embedding EncryptionMethod which is a simple XOR of the first 1040 bytes of each font with the SHA-1 digest of the <package>'s unique-identifier attribute's identifier attribute. For example: <package version="3.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="bookid" ... <dc:identifier id="bookid">urn:uuid:FC73E98D-6B5F-4BF5-BF6B-C26820AFEB10</dc:identifier> Given it's not really DRM or encryption, just obfuscation, and I think just tied to fonts, I'd suggest mupdf does the 'decryption' to better render the EPUB. References: The encryption.xml file: https://www.w3.org/publishing/epub3/epub-ocf.html#sec-container-metainf-encryption.xml The XOR method: http://idpf.org/epub/20/spec/FontManglingSpec_2.0.1_draft.htm
*** This bug has been marked as a duplicate of bug 705640 ***