From 06c77e05a1e79e00015d01f8503a1c01e92624e5 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 17 Sep 2009 10:00:32 -0600 Subject: [PATCH] Fix #3257 (embedded graphics in .odt file look bad when converted to .epub format) --- src/calibre/ebooks/odt/input.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/calibre/ebooks/odt/input.py b/src/calibre/ebooks/odt/input.py index 28e7044201..f83cd34760 100644 --- a/src/calibre/ebooks/odt/input.py +++ b/src/calibre/ebooks/odt/input.py @@ -34,6 +34,11 @@ class Extract(ODF2XHTML): with CurrentDir(odir): print 'Extracting ODT file...' html = self.odf2xhtml(stream) + # A blanket img specification like this causes problems + # with EPUB output as the contaiing element often has + # an absolute height and width set that is larger than + # the available screen real estate + html = html.replace('img { width: 100%; height: 100%; }', '') with open('index.xhtml', 'wb') as f: f.write(html.encode('utf-8')) zf = ZipFile(stream, 'r')