Exporter clip: fix number of stable pages (#14554)

This commit is contained in:
hius07
2025-11-04 08:54:33 +02:00
committed by GitHub
parent 01d1466e38
commit 5c96555838

View File

@@ -378,13 +378,20 @@ function MyClipping:parseFiles(files)
end
function MyClipping:parseCurrentDoc()
local clippings = {}
local title, author = self:getTitleAuthor(self.ui.document.file, self.ui.doc_props)
clippings[title] = {
file = self.ui.document.file,
title = title,
author = author,
number_of_pages = self.ui.view.footer.pages,
local number_of_pages
if self.ui.pagemap and self.ui.pagemap:wantsPageLabels() then
number_of_pages = select(3, self.ui.pagemap:getCurrentPageLabel())
else
number_of_pages = self.ui.view.footer.pages
end
local clippings = {
[title] = {
file = self.ui.document.file,
title = title,
author = author,
number_of_pages = number_of_pages,
},
}
self:parseAnnotations(self.ui.annotation.annotations, clippings[title])
return clippings