add advanced option forced_ocr to force ocring text

This commit is contained in:
chrox
2014-07-17 22:32:20 +08:00
parent e91ddee836
commit 120f18737e
3 changed files with 10 additions and 1 deletions

View File

@@ -402,7 +402,7 @@ returned boxes are in native page coordinates zoomed at 1.0
--]]
function KoptInterface:getTextBoxes(doc, pageno)
local text = doc:getPageTextBoxes(pageno)
if text and #text > 1 then
if text and #text > 1 and doc.configurable.forced_ocr == 0 then
return text
-- if we have no text in original page then we will reuse native word boxes
-- in reflow mode and find text boxes from scratch in non-reflow mode