From c4e336a06004e2cb0c8b9010643d0d2d8572a079 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 30 Jan 2008 07:03:03 +0000 Subject: [PATCH] Fix handling of tables with embedded images --- src/libprs500/ebooks/lrf/html/table.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libprs500/ebooks/lrf/html/table.py b/src/libprs500/ebooks/lrf/html/table.py index 6d422836c8..7473146cde 100644 --- a/src/libprs500/ebooks/lrf/html/table.py +++ b/src/libprs500/ebooks/lrf/html/table.py @@ -135,7 +135,7 @@ class Cell(object): def pts_to_pixels(self, pts): pts = int(pts) - return ceil((float(self.conv.profile.dpi)/72)*(pts/10.)) + return ceil((float(self.conv.profile.dpi)/72.)*(pts/10.)) def minimum_width(self): return max([self.minimum_tb_width(tb) for tb in self.text_blocks]) @@ -198,7 +198,7 @@ class Cell(object): continue if isinstance(token, Plot): width, height = self.pts_to_pixels(token.xsize), self.pts_to_pixels(token.ysize) - left, right, top, bottom = add_word(width, height, left, right, top, bottom, ls, ws) + left, right, top, bottom = add_word(width, height, left, right, top, bottom, height, ws) continue ff = attrs.get('fontfacename', ts['fontfacename']) fs = attrs.get('fontsize', ts['fontsize'])