-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
<Image src={src}/> returned from render function crashes react-pdf #1630
Comments
The exception is raised because the Image node was not resolved ( binary data for the image is not fetched/resolved). Here, resolveAssets function gets a DOM tree and for each Image, node resolves binary src attribute to binary data representation objects. . Dynamic nodes are added on the resolvePagination stage binary assets are resolved to respective Image representation objects. Will the addition of resolveAssets step here fix the issue? |
render prop functionality is limited due to the pagination, layout resolution and those steps order.
Would it be possible to document the render function limitations? |
Just a note that this issue is present in v2 only and prevents upgrades from v1 when using the
On the flip side, if you desperately need this functionality and are not using the v2 features, you can downgrade to v1 for the time being until this gets sorted |
Hey gents, Any plans to have this fixed in v2? |
Hey @vitaliiznak, @JustinHallquist: are you aware of any workaround to dynamically render a logo on each page, with v2? Tnx. |
fix: fetch assets inside dynamic content (diegomura#1369, diegomura#1587, diegomura#1630, diegomura#1936,…
Describe the bug
When returning an
<Image source={logo}/>
component from a render function react-pdf crashes with an errorTo Reproduce
Expected behavior
The document renders the same way regardless if the children are returned from the render method or supplied as children to the component.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: