Skip to content

Commit

Permalink
Generalized __fix_bbox a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
fay59 committed Dec 2, 2014
1 parent efd8f01 commit c9f5112
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions x86manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,11 @@ def process_page(self, page):
self.process_item(item)
self.end_page(page)

def __fix_rect(self, r):
return pdftable.Rect(r.x1(), self.yBase - r.y1(), r.x2(), self.yBase - r.y2())

def __fix_bbox(self, bbox):
x1 = bbox[0]
y1 = self.yBase - bbox[1]
x2 = bbox[2]
y2 = self.yBase - bbox[3]
return pdftable.Rect(x1, y2, x2, y1)
return self.__fix_rect(pdftable.Rect(bbox[0], bbox[3], bbox[2], bbox[1]))

def __merge_text(self, lines):
def sort_text(a, b):
Expand Down

0 comments on commit c9f5112

Please sign in to comment.