Answers.Body: <p>I hadn't looked before so I did a little investigating. With Calibre 4.23 on Linux, I found that it's not exactly <em>Calibre</em>, it's the <em><strong>Reader</strong></em>.</p>
  <p>I don't know why this Reader <em>(it's a newly re-written reader, but I don't know if the old one did this)</em> 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.</p>
  <p>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.</p>
  <p>So at this point I can only suggest:</p>
  <ul>
  <li>Change all the epubs to read-only</li>
  <li>Substitute a different reader</li>
  <li>Send feedback to Calibre</li>
  </ul>
  <h2>additional info</h2>
  <p>I did a little more investigation and found that &quot;ebook-viewer&quot; is writing meta-data under &quot;Miscellaneous&quot; &quot;calibre_bookmarks.txt&quot; even though bookmarks are controlled via the database. Deleting this entire entry via &quot;edit book&quot; has no effect and the book marks are still present because they are in the DB.</p>
  <p>The content written also includes: access time stamps, Book Title, and my User ID. It's written as JSON Base64.</p>
  <p>This should not be happening!</p>
  <p>I posted <a href="https://bugs.launchpad.net/calibre/+bug/1894442" rel="nofollow noreferrer">Bug #1894442</a></p>
  <h2>Calibre Response</h2>
  <p>Calibre says it's not a bug because most users prefer it this way. Nevertheless, it can be turned off by:</p>
  <blockquote>
  <p>LTrun {sic} it off under the miscellaneous section of the viewer
  preferences.</p>
  </blockquote>
  <ol>
  <li>Open the Calibre viewer</li>
  <li><strong>Right-click</strong> the body of the book to bring up the controls</li>
  <li>Select <em><strong>Preferences</strong></em></li>
  <li>Select <em><strong>Miscellaneous</strong></em></li>
  <li><strong>Uncheck</strong> &quot;<em>Keep a copy of annotations/bookmarks in the e-book file, for easy sharing</em>&quot;</li>
  </ol>
  <p>I verified that it worked (at least for one in a row).</p>
  <h2>Update</h2>
  <p>Apparently the checkbox to disable directly annotating the ebook file was removed in recent updates. I don't know why they are working so hard to force a <em>hidden</em> <em><strong>write</strong></em> function into a READER. However only the GUI presentation was removed, the actual option still exists, at least as of the current 6.19.1.</p>
  <p>In the file <code>.config/calibre/viewer-webengine.json</code> an entry of:</p>
  <pre><code>&quot;old_prefs_migrated&quot;: true,
  
         yada yada ...
  
  
   &quot;standalone_misc_settings&quot;: {
        &quot;save_annotations_in_ebook&quot;: false
      },
  </code></pre>
  <p>will still disable directly annotating the ebook file. If the entry is missing, Calibre defaults to <strong>true</strong>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-09-26T12:11:34.137Z
Answers.Text: Thank you so much!
Answers.UserDisplayName: Berny23
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-05T14:38:19.550Z
Answers.Text: This answer outdated as of 2023, the option under Miscellaneous has been removed.
Answers.UserDisplayName: user1461607
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-06T16:42:08.747Z
Answers.Text: @ user1461607 - Thank you for pointing this out, I updated my answer accordingly.
Answers.UserDisplayName: user10216038
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-07-30T08:54:20.947Z
Answers.Text: In the Edit Book Calibre, there's also an option in the preferences "Integration with Calibre" which says: Update metadata embedded in the book when opening. This could also modify the file!
Answers.UserDisplayName: Shayan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-08T17:47:37.840Z
Answers.Text: The checkbox is back and works fine in the current version 6.28.1.
Answers.UserDisplayName: Stein
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-06T18:12:32.657Z
Answers.LastActivityDate: 2023-06-06T16:39:55.067Z
Answers.LastEditDate: 2023-06-06T16:39:55.067Z
Answers.UserDisplayName: user10216038
Body: <p>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 <strong>read</strong> 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.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-09-05T22:52:44.573Z
Comments.Text: I know that Calibre modifies the epub to add bookmarks. If you turn that off in the Preferences under Miscellaneous, do you still get a modified epub?
Comments.UserDisplayName: beaker
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-08-14T12:27:56.213Z
Comments.Text: If you are on Linux and are not tied to Calibre, you can use [zathura](https://wiki.archlinux.org/title/Zathura) for ebooks (and PDFs). It also opens ebooks faster than Calibre. [Here](https://alternativeto.net/software/calibre/?license=opensource) are some more alternatives to Calibre, all open source.
Comments.UserDisplayName: Matthias Braun
Tags: <epub><calibre>
Title: How do I prevent Calibre from modifying EPUB files when I read them?
UserDisplayName: Flux
ThreadText: # How do I prevent Calibre from modifying EPUB files when I read them?
  
  (Asked by: username_0 on 2020-09-04)
  
  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.
  
  **Tags:** epub, calibre
  
  > **Comments:**
  > **username_1**: I know that Calibre modifies the epub to add bookmarks. If you turn that off in the Preferences under Miscellaneous, do you still get a modified epub?  
  > **username_2**: If you are on Linux and are not tied to Calibre, you can use [zathura](https://wiki.archlinux.org/title/Zathura) for ebooks (and PDFs). It also opens ebooks faster than Calibre. [Here](https://alternativeto.net/software/calibre/?license=opensource) are some more alternatives to Calibre, all open source.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2020-09-06. Score: 13 | Accepted 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.
  
  
  Open the Calibre viewer
  Right-click the body of the book to bring up the controls
  Select Preferences
  Select Miscellaneous
  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).
  Update
  Apparently the checkbox to disable directly annotating the ebook file was removed in recent updates. I don't know why they are working so hard to force a hidden write function into a READER. However only the GUI presentation was removed, the actual option still exists, at least as of the current 6.19.1.
  In the file .config/calibre/viewer-webengine.json an entry of:
  "old_prefs_migrated": true,
  
         yada yada ...
  
  
   "standalone_misc_settings": {
        "save_annotations_in_ebook": false
      },
  
  will still disable directly annotating the ebook file. If the entry is missing, Calibre defaults to true.
  
  > **Comments:**
  > **username_4**: Thank you so much!  
  > **username_5**: This answer outdated as of 2023, the option under Miscellaneous has been removed.  
  > **username_3**: @ username_5 - Thank you for pointing this out, I updated my answer accordingly.  
  > **username_6**: In the Edit Book Calibre, there's also an option in the preferences "Integration with Calibre" which says: Update metadata embedded in the book when opening. This could also modify the file!  
  > **username_7**: The checkbox is back and works fine in the current version 6.28.1.  
  
  ---
  
  