Skip to content

Ensure PdfiumBackend closes document and image handles#661

Open
Mohataseem89 wants to merge 1 commit intocamelot-dev:masterfrom
Mohataseem89:patch-1
Open

Ensure PdfiumBackend closes document and image handles#661
Mohataseem89 wants to merge 1 commit intocamelot-dev:masterfrom
Mohataseem89:patch-1

Conversation

@Mohataseem89
Copy link
Copy Markdown

Fixes #660

ensures PdfDocument and rendered PIL Image are always closed,
even if rendering or saving raises an exception. this prevents
open file handle leaks seen in the PyPI release

Ensure resources are properly closed with try-finally blocks.
@Mohataseem89 Mohataseem89 marked this pull request as draft February 6, 2026 11:39
@Mohataseem89 Mohataseem89 marked this pull request as ready for review February 9, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pypi installation missing update to pdfium_backend.py

1 participant