Evince has the option to add bookmarks. My question is simple?
Where is the information about bookmarks stored?
Evince has the option to add bookmarks. My question is simple?
Where is the information about bookmarks stored?
All evince bookmarks are stored as GIO metadata under $HOME/.local/share/gvfs-metadata/.
You can view all stored metadata for a specific file with
gvfs-info -a "metadata::evince::bookmarks" <document-uri>
References:
https://mail.gnome.org/archives/evince-list/2011-August/msg00000.html
I had an issue applying Glutanimate's answer. When I tested it, gvfs-info was not working. Some Web research led me to the conclusion that it is because gvfs-info has been abandoned in favor of gio.
So please try instead:
gio info -a "metadata::evince::bookmarks" <file>
I would like to add to the answer that if your application was installed with flatpak, the gio command won't work because a flatpak application is sandboxed, and the GIO/GVFS metadata is stored under the flatpak app's data folder, ~/.var/app/<flatpak-application-name> (in the case of the new document reader, GNOME Papers, it's under ~/.var/app/org.gnome.Papers/data/gvfs-metadata).
To read the GIO metadata from the flatpak sandbox, launch gio from the flatpak sandbox by overriding its command with gio:
flatpak run --command=gio org.gnome.Evince \
info -a "metadata::evince::bookmarks" <document-uri>
Note that what comes after the application name is considered arguments for the command (here, gio).
I haven't verified with Evince as a flatpak, but I tested this with the new document reader, GNOME Papers, installed with flatpak (flatpak install org.gnome.Papers). It stores booksmarks exactly the same way, substituting the name evince by papers:
$ flatpak run --command=gio org.gnome.Papers \
info -a "metadata::papers::bookmarks" <document-uri>
uri : file:///home/<user>/Documents/<somedocument>.pdf
local path : /home/<user>/Documents/<somedocument>.pdf
(ommitted mount details)
attributes :
metadata::papers::bookmarks: [(246, 'Bookmark 1'), (351, 'Bookmark 2'), (313, 'Bookmark 3')]