1
0
mirror of synced 2024-10-31 22:58:44 +01:00

Better handling of malformed pdf

This commit is contained in:
jvoisin 2020-11-06 16:05:24 +01:00
parent b84f73c5c3
commit f638168033

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)