1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-28 12:30:00 +00:00

Prevent none comment while upload pdf documents

This commit is contained in:
Ozzie Isaacs 2022-04-13 18:37:23 +02:00
parent 83b99fcb1a
commit df53a5d8c9

View File

@ -231,7 +231,7 @@ def pdf_meta(tmp_file_path, original_file_name, original_file_extension):
if title == '':
title = doc_info.title if doc_info.title else original_file_name
if subject == '':
subject = doc_info.subject
subject = doc_info.subject or ""
if tags == '' and '/Keywords' in doc_info:
if isinstance(doc_info['/Keywords'], bytes):
tags = doc_info['/Keywords'].decode('utf-8')