1
0
Fork 0

Better handling of malformed pdf

This commit is contained in:
jvoisin 2020-11-06 16:05:24 +01:00
parent b84f73c5c3
commit f638168033
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ class PDFParser(abstract.AbstractParser):
for pagenum in range(pages_count):
page = document.get_page(pagenum)
if page is None:
logging.error("Unable to get PDF pages")
return False
page_width, page_height = page.get_size()
logging.info("Rendering page %d/%d", pagenum + 1, pages_count)