mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
EPUB Input: Fix EPUB files with empty Adobe PAGE templates causing conversion to abort. Fixes #760390 (epub conversion issue)
This commit is contained in:
parent
869222f9c3
commit
a9a9d8f4ba
@ -20,8 +20,9 @@ class RemoveAdobeMargins(object):
|
|||||||
self.oeb, self.opts, self.log = oeb, opts, log
|
self.oeb, self.opts, self.log = oeb, opts, log
|
||||||
|
|
||||||
for item in self.oeb.manifest:
|
for item in self.oeb.manifest:
|
||||||
if item.media_type in ('application/vnd.adobe-page-template+xml',
|
if (item.media_type in ('application/vnd.adobe-page-template+xml',
|
||||||
'application/vnd.adobe.page-template+xml'):
|
'application/vnd.adobe.page-template+xml') and
|
||||||
|
hasattr(item.data, 'xpath')):
|
||||||
self.log('Removing page margins specified in the'
|
self.log('Removing page margins specified in the'
|
||||||
' Adobe page template')
|
' Adobe page template')
|
||||||
for elem in item.data.xpath(
|
for elem in item.data.xpath(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user