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

PDF files without a filename cannot be split #100

Open
awalker4 opened this issue Aug 6, 2024 · 2 comments
Open

PDF files without a filename cannot be split #100

awalker4 opened this issue Aug 6, 2024 · 2 comments

Comments

@awalker4
Copy link
Collaborator

awalker4 commented Aug 6, 2024

See this comment. If a pdf file does not have .pdf in the filename, we return the message Given file is not a PDF. Continuing without splitting.. The issue is that loadPdf here should not return as soon as the file extension check fails. Let's try to load the file in pdf-lib, and only return if that fails.

@Ziao
Copy link

Ziao commented Aug 20, 2024

Same thing happens when passing in a blob, which obviously has no filename. Shouldn't the library simply use the mimetype or trust that the passed contentType is correct?

@awalker4
Copy link
Collaborator Author

Yes, apologies for the delay here! This will be addressed in #115

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

No branches or pull requests

2 participants