CreDocuments: save EPubCFI alongside xpointers (last_pos, annotations)

EPubCFI is the per-EPUB-specs equivalent of our xpointers.
Save the EPubCFI version of our xpointers in metadata.epub.lua
so they can be used by plugins or external tools.
They are not used internally.
This commit is contained in:
Adam Buntain-Cooper authored and GitHub committed 2026-10-09 08:38:20 +02:00
1 parent 2adaff6e46
commit 0deae50039
7 files changed
+106 -1

No files matched your search

@@ -78,6 +78,7 @@ function ReaderAnnotation:buildAnnotation(bm, highlights, init)
page = bm.page, -- highlight location, xPointer or number (pdf)
pos0 = bm.pos0, -- highlight start position, xPointer (== page) or table (pdf)
pos1 = bm.pos1, -- highlight end position, xPointer or table (pdf)
epubcfi = bm.epubcfi, -- epubcfi, based on pos0/pos1 xPointers, not used by pdf
pboxes = hl.pboxes, -- pdf pboxes, used only and changeable by addMarkupAnnotation
ext = hl.ext, -- pdf multi-page highlight
}