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.
pull/1471/head
chrox 9 years ago
parent 68e1b6ea19
commit c2924abac4

@ -1 +1 @@
Subproject commit 57d4cca62d6e1f14c32bf883a4d3b3ff63b2a9cd
Subproject commit 5af9c0e97716d94df47ad07a3639263a6ed49e3d

@ -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,

Loading…
Cancel
Save