diff --git a/src/calibre/ebooks/oeb/output.py b/src/calibre/ebooks/oeb/output.py index 2cb513293c..18c20f334d 100644 --- a/src/calibre/ebooks/oeb/output.py +++ b/src/calibre/ebooks/oeb/output.py @@ -28,9 +28,8 @@ class OEBOutput(OutputFormatPlugin): href, root = results.pop(key, [None, None]) if root is not None: raw = etree.tostring(root, pretty_print=True, - encoding='utf-8') + encoding='utf-8', xml_declaration=True) with open(href, 'wb') as f: - f.write('\n') f.write(raw) for item in oeb_book.manifest: