add text highlight in both reflow and non-reflow mode

This commit is contained in:
chrox
2013-04-24 06:59:52 +08:00
parent 7f53ddacbe
commit 936dfc6fd1
11 changed files with 457 additions and 46 deletions

View File

@@ -47,6 +47,25 @@ function validDjvuFile(filename)
return true
end
function DjvuDocument:getPageText(pageno)
if self.configurable.text_wrap == 1 then
return self.koptinterface:getPageText(self, pageno)
else
return self._document:getPageText(pageno)
end
end
function DjvuDocument:getOCRWord(pageno, rect)
if self.configurable.text_wrap == 1 then
return self.koptinterface:getOCRWord(self, pageno, rect)
else
--local page = self._document:openPage(pageno)
--local word = page:getOCRWord(rect)
--page:close()
--return word
end
end
function DjvuDocument:getUsedBBox(pageno)
-- djvu does not support usedbbox, so fake it.
local used = {}