Close

Quick software update: Bookmark retention

A project log for Diptyx E-reader

A dual-screen, ESP32 powered ereader: Own your device, own your books

martijnMartijn 11/11/2025 at 16:020 Comments

When reading with the Diptyx E-reader, you can add a bookmark to the current page by pressing the down button. This shows a black triangle in the top-right (like folding the corner of a page in a real book), and you can quickly jump to a bookmark in the quickmenu. 
There is an issue with this however: When changing the rendering settings (font, font size, line-spacing, etc.), the layout of the book changes, and the book must be re-indexed. This changes what text is displayed on which page, meaning the bookmarks are now useless!

The black top-right corned indicates a bookmark is present here
When changing the rendering settings, the layout of a book changes and it must be re-indexed

In the latest software update, this has now been resolved. Instead of only saving the pagenumber of each bookmark, we now also store the chapter in which the bookmark is present, and the index of the first html element on the page that the bookmark points to. Now, when re-indexing the book after changing the render settings, the book indexing routine will check for every html element that it comes accross if the bookmark is present there, and change the pagenumber of the bookmark accordingly. 
There can always be a slight discrepancy, as the contents of each page is slightly different when changing the render-settings, but even in the worst case the bookmark likely won't be off by more than a page after re-indexing.

The font has changed, but after re-indexing the bookmark now still points to the correct content (also note how the pagenumber is now different)
In the quickmenu, you can see all the bookmarks. These are all automatically updated when changing the book layout

Discussions