mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix OCR fails on native djvu pages
The page_width and page_height were always 600 and 800 before this patch rendering the OCR engine confused. This should fix #1379.
This commit is contained in:
@@ -620,7 +620,9 @@ function KoptInterface:getNativeOCRWord(doc, pageno, rect)
|
||||
kc:setZoom(30/rect.h)
|
||||
local page = doc._document:openPage(pageno)
|
||||
page:getPagePix(kc)
|
||||
--kc:exportSrcPNGFile({rect}, nil, "ocr-word.png")
|
||||
local word_w, word_h = kc:getPageDim()
|
||||
--DEBUG(word_w, word_h)
|
||||
local ok, word = pcall(
|
||||
kc.getTOCRWord, kc, "src",
|
||||
0, 0, word_w, word_h,
|
||||
|
||||
Reference in New Issue
Block a user