PDF Output: Dont fail if the input document has an html file identified as the cover

This commit is contained in:
Kovid Goyal 2020-09-28 08:45:06 +05:30
parent 51a0dfa54f
commit ec59a9b624
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -196,7 +196,8 @@ class PDFOutput(OutputFormatPlugin):
if (oeb.metadata.cover and unicode_type(oeb.metadata.cover[0]) in oeb.manifest.ids): if (oeb.metadata.cover and unicode_type(oeb.metadata.cover[0]) in oeb.manifest.ids):
cover_id = unicode_type(oeb.metadata.cover[0]) cover_id = unicode_type(oeb.metadata.cover[0])
item = oeb.manifest.ids[cover_id] item = oeb.manifest.ids[cover_id]
self.cover_data = item.data if isinstance(item.data, bytes):
self.cover_data = item.data
def process_fonts(self): def process_fonts(self):
''' Make sure all fonts are embeddable ''' ''' Make sure all fonts are embeddable '''