mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-29 09:12:58 +02:00
...
This commit is contained in:
parent
12df3ac3c4
commit
5d3415dcfb
1 changed files with 2 additions and 1 deletions
|
|
@ -693,10 +693,11 @@ def insert_image(self, href, fullpage=False, preserve_aspect_ratio=False):
|
|||
href = prepare_string_for_xml(href, True)
|
||||
if fullpage:
|
||||
template = '''\
|
||||
<div style="page-break-before:always; page-break-after:always; page-break-inside:avoid">\
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" \
|
||||
version="1.1" width="100%%" height="100%%" viewBox="0 0 1200 1600" preserveAspectRatio="{}">\
|
||||
<image width="1200" height="1600" xlink:href="%s"/>\
|
||||
</svg>'''.format('xMidYMid meet' if preserve_aspect_ratio else 'none')
|
||||
</svg></div>'''.format('xMidYMid meet' if preserve_aspect_ratio else 'none')
|
||||
else:
|
||||
alt = _('Image')
|
||||
template = '<img alt="{0}" src="%s" />'.format(alt)
|
||||
|
|
|
|||
Loading…
Reference in a new issue