Conversion pipeline: When setting margins on <body> explicitly set padding to 0 to override and existing padding in the input document

This commit is contained in:
Kovid Goyal 2010-09-13 18:18:32 -06:00
parent fb053fe3f3
commit ba5de1c92d

View File

@ -138,6 +138,7 @@ class CSSFlattener(object):
float(self.context.margin_left)) float(self.context.margin_left))
bs.append('margin-right : %fpt'%\ bs.append('margin-right : %fpt'%\
float(self.context.margin_right)) float(self.context.margin_right))
bs.extend(['padding-left: 0pt', 'padding-right: 0pt'])
if self.context.change_justification != 'original': if self.context.change_justification != 'original':
bs.append('text-align: '+ self.context.change_justification) bs.append('text-align: '+ self.context.change_justification)
body.set('style', '; '.join(bs)) body.set('style', '; '.join(bs))