Fix text/image files not closed in combine_layers

This commit is contained in:
James R. Barlow
2018-03-23 13:48:37 -07:00
parent 3795d6720f
commit 376dfdba1c
+2 -2
View File
@@ -705,8 +705,8 @@ def combine_layers(
image = next(ii for ii in flatten_groups(infiles)
if ii.endswith('.image-layer.pdf'))
pdf_text = pypdf.PdfFileReader(open(text, "rb"))
pdf_image = pypdf.PdfFileReader(open(image, "rb"))
pdf_text = pypdf.PdfFileReader(text)
pdf_image = pypdf.PdfFileReader(image)
page_text = pdf_text.getPage(0)