fix: correct pdfium() on playa.Document created from file #11

Merged
dhdaines merged 2 commits from pdfium_on_document into main 2025-07-02 22:32:32 -04:00
dhdaines commented 2025-07-02 22:23:15 -04:00 (Migrated from github.com)

We still use _fp if it's there, which may or may not be a good idea, but otherwise we can, and will, simply wrap a BytesIO around pdf.buffer, which works quite well.

Also use a context manager to remove calls to doc.close() though sadly we can't do this for page.close() too.

We still use `_fp` if it's there, which may or may not be a good idea, but otherwise we can, and will, simply wrap a `BytesIO` around `pdf.buffer`, which works quite well. Also use a context manager to remove calls to `doc.close()` though sadly we can't do this for `page.close()` too.
Sign in to join this conversation.
No description provided.