Skip to content

Commit 572db02

Browse files
YB27bosd
authored andcommitted
Update pdfium_backend.py (close open documents)
1 parent b332f81 commit 572db02

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

camelot/backends/pdfium_backend.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ def convert(self, pdf_path: str, png_path: str, resolution: int = 300) -> None:
4141
doc.init_forms()
4242
image = doc[0].render(scale=resolution / 72).to_pil()
4343
image.save(png_path)
44+
image.close()
45+
doc.close()

0 commit comments

Comments
 (0)