-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
react-pdf not rendering images correctly during pdf.(<Document>).toBlob() #2842
Comments
have you found the solution? |
I ended up using PNG directly instead of SVG conversion! Much easier and efficient. here is an example:
Example with PDFViewer and :
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Since react-pdf is not accepting SVG images i have created a function which first converts the svg into png and then to base64 string. This solution is working fine when rendering the pdf using the PDFViewer. However i do not want to render it on front end but im trying to convert the entire pdf to base64 so i can send it as email attachement.
To Reproduce
Steps to reproduce the behavior including code snippet (if applies):
2.React component to construct the Document:
Until this point the code should work. Images should rendered on the PDF.
Expected behavior
The code should return a base64 string of type pdf of the PDF Document
Any feedback is appreciated!
The text was updated successfully, but these errors were encountered: