TransWikia.com

How do I prevent Calibre from modifying EPUB files when I read them?

Ebooks Asked on January 10, 2021

Whenever I have an EPUB file and open/read it using Calibre, Calibre silently edits the EPUB file. I know that Calibre edited my EPUBs because I calculated the checksums (SHA-256, MD5, etc.) before and after reading. This is surprising, improper, and undesirable behavior. I didn’t ask Calibre to modify my books without my permission. An EPUB reader is supposed to read EPUB files, and not edit them. How do I stop Calibre from silently editing my EPUB files when I read them? The checksums before and after reading must remain the same.

One Answer

I hadn't looked before so I did a little investigating. With Calibre 4.23 on Linux, I found that it's not exactly Calibre, it's the Reader.

I don't know why this Reader (it's a newly re-written reader, but I don't know if the old one did this) is modifying the epub meta-data. There is no reason to do so that I'm aware of as bookmarks and other reading information is kept in the database.

With that in mind, I changed the EPUB file permission to remove write permission. As a Read-Only file, everything seems to continue working normally and the Reader is no longer capable of changing it.

So at this point I can only suggest:

  • Change all the epubs to read-only
  • Substitute a different reader
  • Send feedback to Calibre

additional info

I did a little more investigation and found that "ebook-viewer" is writing meta-data under "Miscellaneous" "calibre_bookmarks.txt" even though bookmarks are controlled via the database. Deleting this entire entry via "edit book" has no effect and the book marks are still present because they are in the DB.

The content written also includes: access time stamps, Book Title, and my User ID. It's written as JSON Base64.

This should not be happening!

I posted Bug #1894442

Calibre Response

Calibre says it's not a bug because most users prefer it this way. Nevertheless, it can be turned off by:

LTrun {sic} it off under the miscellaneous section of the viewer preferences.

  1. Open the Calibre viewer
  2. Right-click the body of the book to bring up the controls
  3. Select Preferences
  4. Select Miscellaneous
  5. Uncheck "Keep a copy of annotations/bookmarks in the e-book file, for easy sharing"

I verified that it worked (at least for one in a row).

Correct answer by user10216038 on January 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP