mirror of
https://github.com/ciromattia/kcc
synced 2026-02-19 18:48:57 +00:00
skip blanks on image based pdfs (#1228)
This commit is contained in:
@@ -801,9 +801,7 @@ def extract_page(vector):
|
||||
if len(image_list) > 1:
|
||||
raise UserWarning("mupdf_pdf_extract_page_image() function can be used only with single image pages.")
|
||||
if not image_list:
|
||||
width, height = int(page.rect.width), int(page.rect.height)
|
||||
blank_page = Image.new("RGB", (width, height), "white")
|
||||
blank_page.save(output_path)
|
||||
continue
|
||||
else:
|
||||
xref = image_list[0][0]
|
||||
d = doc.extract_image(xref)
|
||||
|
||||
Reference in New Issue
Block a user