Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP feat: accept binary PDF instead of just path to PDF #416

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aguadoenzo
Copy link

While the library expects a filepath to be given to the PdfConverter, the underlying pdfium.PdfDocument constructor supports bytes and other types. Adding 'bytes' as an accepted type for the Document Pydantic model allows binary PDFs to be parsed by the library.

I've tested this patch manually and things seem to work fine so far, but I'd prefer to add tests for it. However the test suite seems to be heavily built around creating a temporary file, and I'm not sure where to start to test this

While the library expects a filepath to be given to the
PdfConverter, the underlying pdfium.PdfDocument constructor
supports bytes and other types. Adding 'bytes' as an accepted
type for the Document Pydantic model allows binary PDFs to be
parsed by the library.
Copy link
Contributor

github-actions bot commented Dec 5, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@aguadoenzo
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Dec 5, 2024
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.

1 participant