mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
e5e2bc94a1
commit
d06947281b
@ -141,8 +141,8 @@ class CoverManager(object):
|
||||
if width is None or height is None:
|
||||
self.log.warning('Failed to read cover dimensions')
|
||||
width, height = 600, 800
|
||||
if self.preserve_aspect_ratio:
|
||||
width, height = 600, 800
|
||||
#if self.preserve_aspect_ratio:
|
||||
# width, height = 600, 800
|
||||
self.svg_template = self.svg_template.replace('__viewbox__',
|
||||
'0 0 %d %d'%(width, height))
|
||||
self.svg_template = self.svg_template.replace('__width__',
|
||||
|
@ -47,7 +47,7 @@ class PDFOutput(OutputFormatPlugin):
|
||||
OptionRecommendation(name='preserve_cover_aspect_ratio',
|
||||
recommended_value=False,
|
||||
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.')
|
||||
),
|
||||
])
|
||||
|
Loading…
x
Reference in New Issue
Block a user