-
-
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
SVGs Not Cooperating in Render Function #3053
Comments
I have a similiar Issue here, but with the difference that the PDF is not loading at all afterwards by printing the following Error to console:
I encountered, that loading svg from a prop does not work, as when i use the same svg which is handed over by props directly inside the render function, it works...
As i like to dynamically render svg layouts based on page numbers (so that i can switch between Layouts while page wrapping) this would be needed in order to work. I'm also on Arc on MacOS if this has any relevance for this issue. |
So i did some more debugging in the libs code and found that rendering components dynamically (using the
I also found the element in my svg:
Seems that the svg props are not read or transformed correctly. |
I'm trying to render a SVG inside a View's render function (I want a header that does not appear on the first page, so by using the View's render function I can access the pageNumber). However, when the SVG is inside the render function, nothing I do to change its size works. I've tried editing the viewbox and other attributes and putting the SVG in a View, but it has a mind of its own. If I remove it from the View's render function and just have it as a child of a View, it works fine. But then I lose access to pageNumber.
In the below, Logo is the SVG in question. And the styles on the Views seem to make no difference to it.
To Reproduce
Expected behavior
I would expect that no matter where the SVG is rendered, I can adjust it. I have the exact same SVG in other places in the PDF, and it responds just fine.
Desktop:
The text was updated successfully, but these errors were encountered: