From b76a70e528c11ba0ec71d653ccb30041c9a36af3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 13 May 2017 18:38:01 +0530 Subject: [PATCH] DOCX Input: Workaround for broken Word documents created by "PDF Converter Professional 8". Fixes #1690537 [Word document (docx) can not be converted to ePub](https://bugs.launchpad.net/calibre/+bug/1690537) --- src/calibre/ebooks/docx/to_html.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/ebooks/docx/to_html.py b/src/calibre/ebooks/docx/to_html.py index 8fd8c48d9e..62780e3644 100644 --- a/src/calibre/ebooks/docx/to_html.py +++ b/src/calibre/ebooks/docx/to_html.py @@ -271,6 +271,8 @@ class Convert(object): cname[-1] = defname if self.docx.exists('/'.join(cname)): name = name + if name and name.startswith('word/word') and not self.docx.exists(name): + name = name.partition('/')[2] return name nname = get_name(self.namespace.names['NUMBERING'], 'numbering.xml')