diff --git a/src/calibre/ebooks/epub/output.py b/src/calibre/ebooks/epub/output.py
index 61aa2c359a..dc8905619d 100644
--- a/src/calibre/ebooks/epub/output.py
+++ b/src/calibre/ebooks/epub/output.py
@@ -81,12 +81,40 @@ class EPUBOutput(OutputFormatPlugin):
OptionRecommendation(name='no_default_epub_cover', recommended_value=False,
help=_('Normally, if the input file has no cover and you don\'t'
' specify one, a default cover is generated with the title, '
- 'authors, etc. This option disables the generation of this cover.')),
+ 'authors, etc. This option disables the generation of this cover.')
+ ),
+
+ OptionRecommendation(name='no_svg_cover', recommended_value=False,
+ help=_('Do not use SVG for the book cover. Use this option if '
+ 'your EPUB is going to be used ona device that does not '
+ 'support SVG, like the iPhone or the JetBook Lite. '
+ 'Without this option, such devices will display the cover '
+ 'as a blank page.')
+ ),
])
recommendations = set([('pretty_print', True, OptionRecommendation.HIGH)])
+ NONSVG_TITLEPAGE_COVER = '''\
+
+
+
+
+ Cover
+
+
+
+
+

+
+
+
+ '''
TITLEPAGE_COVER = '''\
@@ -301,7 +329,9 @@ class EPUBOutput(OutputFormatPlugin):
else:
href = self.default_cover()
if href is not None:
- tp = self.TITLEPAGE_COVER%unquote(href)
+ templ = self.NONSVG_TITLEPAGE_COVER if self.opts.no_svg_cover \
+ else self.TITLEPAGE_COVER
+ tp = templ%unquote(href)
id, href = m.generate('titlepage', 'titlepage.xhtml')
item = m.add(id, href, guess_type('t.xhtml')[0],
data=etree.fromstring(tp))
diff --git a/src/calibre/gui2/convert/epub_output.py b/src/calibre/gui2/convert/epub_output.py
index 2afa662fb4..57027d9315 100644
--- a/src/calibre/gui2/convert/epub_output.py
+++ b/src/calibre/gui2/convert/epub_output.py
@@ -17,7 +17,8 @@ class PluginWidget(Widget, Ui_Form):
def __init__(self, parent, get_option, get_help, db=None, book_id=None):
Widget.__init__(self, parent, 'epub_output',
- ['dont_split_on_page_breaks', 'flow_size', 'no_default_epub_cover']
+ ['dont_split_on_page_breaks', 'flow_size',
+ 'no_default_epub_cover', 'no_svg_cover']
)
self.db, self.book_id = db, book_id
self.initialize_options(get_option, get_help, db, book_id)
diff --git a/src/calibre/gui2/convert/epub_output.ui b/src/calibre/gui2/convert/epub_output.ui
index f282214996..7f92ec3087 100644
--- a/src/calibre/gui2/convert/epub_output.ui
+++ b/src/calibre/gui2/convert/epub_output.ui
@@ -21,7 +21,7 @@
- -
+
-
Split files &larger than:
@@ -31,7 +31,7 @@
- -
+
-
KB
@@ -47,7 +47,7 @@
- -
+
-
Qt::Vertical
@@ -67,6 +67,13 @@
+ -
+
+
+ No &SVG cover
+
+
+