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

Error: addImage does not support files of type 'UNKNOWN', please ensure that a plugin for 'UNKNOWN' support is added. #139

Open
ShaniaKC opened this issue Aug 12, 2024 · 4 comments

Comments

@ShaniaKC
Copy link

Hello,
First, thank you for the package!

I encountered this error : "Error: addImage does not support files of type 'UNKNOWN', please ensure that a plugin for 'UNKNOWN' support is added" while using the package today, It started before I made any changes to my code,( was working before ).

I'm using the generatePDF function like so
generatePDF(editorWrapperRef, { filename: "page.pdf", overrides: {}, });

Stack Trace
[Error] Unhandled Promise Rejection: Error: addImage does not support files of type 'UNKNOWN', please ensure that a plugin for 'UNKNOWN' support is added. P2 (react-to-pdf.js:3496:200) (anonymous function) (react-to-pdf.js:3486) convert (react-to-pdf.js:8660) (anonymous function) (react-to-pdf.js:8719)

@chendjou237
Copy link

can you provide the part of the code where you did the implementation of the PdfToReact hook

@sidahmedabdelillah
Copy link

sidahmedabdelillah commented Dec 29, 2024

Having the same problem here
const contentRef = useRef<HTMLDivElement>(null); useImperativeHandle(ref, () => ({ print: () => {}, download: () => generatePDF(contentRef, { filename: "pdf.pdf", method: 'save' }), }));

@eirikur-nc
Copy link

I've received a Sentry event with this error but haven't been able to reproduce myself. The user who encountered it was on Safari 16.6.1. I've tried with Safari 18.2 and that worked fine.

@eirikur-nc
Copy link

Perhaps related to parallax/jsPDF#3692

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

4 participants