-
Notifications
You must be signed in to change notification settings - Fork 253
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.image() doesn't allow file names starting with 'data' #794
Comments
@allcontributors please add @1nv for bug |
I've put up a pull request to add @1nv! 🎉 |
Hi @Lucas-C,
Yes, that's exactly what I was thinking of, since EDIT: I just checked, and it is still valid on Unix/Linux. But this should still be fine, I think. |
Thanks for your feedback I merged #796 It is not released yet, but you can install the latest version of
If you can test it @1nv I'd be happy to know if that solved your issue 😊 |
I just tested the way you said, and it works fine! |
Error details
When trying to call
pdf.image()
withfilename
starting with'data'
, an error occurs:This is caused by treating anything starting with
'data'
as base64 string (seeload_image()
withelif filename.startswith("data"):
check), but some file paths might also start with those characters.Minimal code
Environment
fpdf2
version used: 2.7.4The text was updated successfully, but these errors were encountered: