Commit f6381680 authored by jvoisin's avatar jvoisin
Browse files

Better handling of malformed pdf

parent b84f73c5
......@@ -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()"Rendering page %d/%d", pagenum + 1, pages_count)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment