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

Svg does not render if called from View's render function #2998

Open
jwboardman opened this issue Dec 12, 2024 · 2 comments
Open

Svg does not render if called from View's render function #2998

jwboardman opened this issue Dec 12, 2024 · 2 comments

Comments

@jwboardman
Copy link

jwboardman commented Dec 12, 2024

Description
The Svg component does not render if used within a View's render function, but does render if used as a child of a View.

To reproduce:
Code Sandbox Example
If you use Chrome, open the preview in a new window, as at least my Chrome is blocking it.

  1. Look at PdfRenderError.tsx where two components are defined.
  2. Run the example and see that the first one renders the Svg, the second does not.
  3. The only difference is the second one is used within the render function of the View.

Expected behavior
I would expect both Svg components to render correctly.

Screenshots
Svg issue

Desktop (please complete the following information):

  • OS: Mac, Windows, Android, iOS
  • Browser Chrome (all but Android where PDFs are not viewable, but still can be seen by clicking the download button), Firefox, Edge
  • React-pdf version 4.1.5
@PieterT2000
Copy link

This could be related to #2988

@jwboardman
Copy link
Author

Thanks for the response. I changed the example to 4.1.2 but I still see the same issue.

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