View Single Post
Old 09-02-2022, 02:08 PM   #55
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,864
Karma: 169716272
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by bookman156 View Post
I see. So though Kobo supports epub3, it wouldn't be able to tell whether an epub3 with Adobe encryption was epub 2 or 3. But for an epub3 without any DRM no problem.
Not quite right. The .opf file is not encrypted so you can still check for the version="" to see if it was an epub2 or epub3. Then you would check for encryption.xml and rights.xml files in the META-INF directory and parse them to see if the book itself is encrypted (you need to parse the files since encryption.xml is also used for font obfuscation and I have had a couple of downloaded library books without DRM that had those files).

Basically, using the file extension to decide which renderer to use is simpler and allows you to force which renderer to use.
DNSB is offline   Reply With Quote