Skip to content

Commit

Permalink
multipage renderer: add missing close() calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Sep 20, 2022
1 parent f8608e8 commit c44d81a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pypdfium2/_helpers/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,9 @@ def _process_page(cls, index, converter, input_data, password, file_access, **kw
file_access = file_access,
)
page = pdf.get_page(index)
return page.render_to(converter, **kwargs), index
result = page.render_to(converter, **kwargs)
for g in (page, pdf): g.close()
return result, index


def render_to(
Expand Down

0 comments on commit c44d81a

Please sign in to comment.