Skip to content

Commit

Permalink
fix auto bbox calculation in in top-to-bottom writing direction
Browse files Browse the repository at this point in the history
  • Loading branch information
chrox committed May 29, 2014
1 parent 88e83ba commit 3565578
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ffi/koptcontext.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ function KOPTContext_mt.__index:getTOCRWord(bmp, x, y, w, h, datadir, lang, ocr_
end

function KOPTContext_mt.__index:getAutoBBox()
-- fall back to default writing direction when detecting bbox
self:setWritingDirection(0)
k2pdfopt.k2pdfopt_crop_bmp(self)
local x0 = self.bbox.x0/self.zoom
local y0 = self.bbox.y0/self.zoom
Expand Down

0 comments on commit 3565578

Please sign in to comment.