EPUB Output: When using preserve cover aspect ratio, use the actual image sizes in the SVG template as otherwise ADE doesn't render the images correctly

This commit is contained in:
Kovid Goyal 2011-01-28 10:05:16 -07:00
parent e5e2bc94a1
commit d06947281b
2 changed files with 3 additions and 3 deletions

View File

@ -141,8 +141,8 @@ class CoverManager(object):
if width is None or height is None: if width is None or height is None:
self.log.warning('Failed to read cover dimensions') self.log.warning('Failed to read cover dimensions')
width, height = 600, 800 width, height = 600, 800
if self.preserve_aspect_ratio: #if self.preserve_aspect_ratio:
width, height = 600, 800 # width, height = 600, 800
self.svg_template = self.svg_template.replace('__viewbox__', self.svg_template = self.svg_template.replace('__viewbox__',
'0 0 %d %d'%(width, height)) '0 0 %d %d'%(width, height))
self.svg_template = self.svg_template.replace('__width__', self.svg_template = self.svg_template.replace('__width__',

View File

@ -47,7 +47,7 @@ class PDFOutput(OutputFormatPlugin):
OptionRecommendation(name='preserve_cover_aspect_ratio', OptionRecommendation(name='preserve_cover_aspect_ratio',
recommended_value=False, recommended_value=False,
help=_('Preserve the aspect ratio of the cover, instead' help=_('Preserve the aspect ratio of the cover, instead'
' of stretching it to fill the ull first page of the' ' of stretching it to fill the full first page of the'
' generated pdf.') ' generated pdf.')
), ),
]) ])