Answers.Body: <p>When the Calibre <em>E-book viewer</em> is used to add annotations to a text, the data is stored in the text's accompanying .opf file in the Calibre Library.</p>
  <p>For example, in an annotation added to <em>The Nurserymatograph - A Lawyer.epub</em> below, sharing a folder with <em>metadata.opf</em>, the data is stored in the HTML section</p>
  <pre><code>&lt;meta name=&quot;calibre:annotation&quot; content=&quot;... &quot;/&gt;
  </code></pre>
  <p><a href="https://i.sstatic.net/9QzAzNSK.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/9QzAzNSK.png" alt="Calibre annotation storage" /></a></p>
  <p>Of course, one can make another app the default to open a text (as I have done, because the Calibre <em>E-book viewer</em> is abysmally slow to start), in which case annotations would be stored elsewhere.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-20T01:34:09.443Z
Answers.LastActivityDate: 2024-08-20T01:41:02.797Z
Answers.LastEditDate: 2024-08-20T01:41:02.797Z
Answers.UserDisplayName: DrMoishe Pippik
Body: <p>When I open an EPUB file, a JSON file is created in <code>~/.config/calibre/viewer/annots/</code> with information such as last position, highlights/annotations etc. However, if I delete the JSON files from <code>viewer/annots</code> and I re-open the e-book, the highlights/annotations are still there.</p>
  <p>Within the viewer, the option to &quot;Keep a copy of annotations/bookmarks in the e-book file, for easy sharing&quot; is unchecked (under Preferences &gt; Miscellaneous), but in order to confirm, I made a copy of the e-book, added some highlights in the copy and checked the md5sum for both files, which were identical. I also put a keyword in the annotation and used Calibre's E-book editor to search for the keyword in the contents of the EPUB, but couldn't find it.</p>
  <p>So, it looks like annotations are not stored in the e-books themselves and they're not coming from the (deleted) JSON files in <code>viewer/annots</code>, so why do they persist and where are they stored?</p>
  <p><strong>System info</strong></p>
  <ul>
  <li>Kubuntu 22.04</li>
  <li>Calibre 5.37</li>
  </ul>
  
Tags: <epub><calibre><annotations>
Title: Where does Calibre E-book viewer store annotations?
UserDisplayName: Ratler
ThreadText: # Where does Calibre E-book viewer store annotations?
  
  (Asked by: username_0 on 2024-06-23)
  
  When I open an EPUB file, a JSON file is created in `~/.config/calibre/viewer/annots/` with information such as last position, highlights/annotations etc. However, if I delete the JSON files from `viewer/annots` and I re-open the e-book, the highlights/annotations are still there.
  
  Within the viewer, the option to "Keep a copy of annotations/bookmarks in the e-book file, for easy sharing" is unchecked (under Preferences > Miscellaneous), but in order to confirm, I made a copy of the e-book, added some highlights in the copy and checked the md5sum for both files, which were identical. I also put a keyword in the annotation and used Calibre's E-book editor to search for the keyword in the contents of the EPUB, but couldn't find it.
  
  So, it looks like annotations are not stored in the e-books themselves and they're not coming from the (deleted) JSON files in `viewer/annots`, so why do they persist and where are they stored?
  
  **System info**
  
  * Kubuntu 22.04
  * Calibre 5.37
  
  **Tags:** epub, calibre, annotations
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-08-20. Score: 1
  
  When the Calibre E-book viewer is used to add annotations to a text, the data is stored in the text's accompanying .opf file in the Calibre Library.
  For example, in an annotation added to The Nurserymatograph - A Lawyer.epub below, sharing a folder with metadata.opf, the data is stored in the HTML section
  
  
  
  Of course, one can make another app the default to open a text (as I have done, because the Calibre E-book viewer is abysmally slow to start), in which case annotations would be stored elsewhere.
  
  
  ---
  
  