Open praveen-jangre opened 1 year ago
It's not clear how you're password protecting the file, but in any case it wouldn't be something that's supported by Epub.js (unless you're encrypting the whole file after zipping, in which case just reverse that before feeding it to Epub.js).
The most proper way to do DRM would involve using encryption.xml
, which Epub.js does not support (it doesn't even deobfuscate fonts). If you use something like that, you'd need to decrypt it yourself and serve the EPUB unpacked to Epub.js (i.e. opening it as a directory or .opf
or .json
).
@johnfactotum Thank you for your response.
As you know, ePub files are zip-compressed files. Passwords have been added to these zip-compressed files so that only people with the correct passwords can open the files.
Could you help me how I can load these password-protected ePub files using epub.js?
Epub.js uses JSZip, which doesn't support password protected zip files. So you're best option would be to use another Zip library and unpack it before opening it with Epub.js (i.e. serving the EPUB as a directory or .opf or .json).
I am working on the ePub rendering engine. To achieve file/content protection, we have done file protection with a password.
Could you please help me open these password-protected files which are stored in the server as well as local storage?
Thank you in advance.