From ea911c7142c2a05e219b51d7c5e46874d3e04a8a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 2 Apr 2011 10:45:52 -0600 Subject: [PATCH] Fix #748403 (Private bug) --- src/calibre/ebooks/oeb/transforms/page_margin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/ebooks/oeb/transforms/page_margin.py b/src/calibre/ebooks/oeb/transforms/page_margin.py index c415dda0e0..bc1925e343 100644 --- a/src/calibre/ebooks/oeb/transforms/page_margin.py +++ b/src/calibre/ebooks/oeb/transforms/page_margin.py @@ -20,7 +20,8 @@ class RemoveAdobeMargins(object): self.oeb, self.opts, self.log = oeb, opts, log for item in self.oeb.manifest: - if item.media_type == 'application/vnd.adobe-page-template+xml': + if item.media_type in ('application/vnd.adobe-page-template+xml', + 'application/vnd.adobe.page-template+xml'): self.log('Removing page margins specified in the' ' Adobe page template') for elem in item.data.xpath( @@ -35,7 +36,7 @@ class RemoveFakeMargins(object): ''' Remove left and right margins from paragraph/divs if the same margin is specified - on almost all the elements of at that level. + on almost all the elements at that level. Must be called only after CSS flattening '''