Make Page.lines work correctly for pages with no bottom margin.
This commit is contained in:
parent
7fab8328df
commit
8b95460f10
1 changed files with 2 additions and 1 deletions
|
|
@ -127,6 +127,8 @@ class Page(PageObject):
|
||||||
yield Line(self.image[line_start:i,:])
|
yield Line(self.image[line_start:i,:])
|
||||||
line_start = None
|
line_start = None
|
||||||
prev_line_end = i
|
prev_line_end = i
|
||||||
|
if line_start is not None:
|
||||||
|
yield Line(self.image[line_start:,:])
|
||||||
|
|
||||||
def _merge_lines(self, lines, min_space=2, min_height=10):
|
def _merge_lines(self, lines, min_space=2, min_height=10):
|
||||||
prev_line = None
|
prev_line = None
|
||||||
|
|
@ -150,7 +152,6 @@ class Page(PageObject):
|
||||||
yield prev_line
|
yield prev_line
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Line(PageObject):
|
class Line(PageObject):
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return iter(self.glyphs)
|
return iter(self.glyphs)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue