Open jrtell1 opened 11 months ago
@jrtell1 I had the same problem and was able to resolve it. https://github.com/diegomura/react-pdf/pull/2465
@Justinio99 Nice one!
Here's hoping it'll get merged!
@Justinio99 I just discovered that there are issues with custom fonts within the render prop as well, as soon as I put text inside a render prop, it loses any defined custom font and render with some default font instead.
Units like style={{ height: '2cm' }}
are also not working from within the render prop. Only numbers are working.
Edit: Flexbox is not working as well, I assume it is a general problem.
If it helps, the issue is PROBABLY related to the image size. For small images (in KBs) it works fine
@hwaliashraf I've tried with as small as 3 KB images
@jgo80 The styles issue seems to be a separate issue and have been resolved 😄 : https://github.com/diegomura/react-pdf/issues/2531#event-11765218964 (Not released yet though at time of writing)
Describe the bug When placing an
<Image/>
element in a render prop an error occurs. For example, I want to show an image last but only on the first page, not on the consecutive pages. So I need to use the render prop to getpageNumber
value. It works using<Text/>
but not with<Image/>
To Reproduce Steps to reproduce the behavior including code snippet (if applies):
<Document>
:<Image/>
:React PDF REPL link You will see it getting stuck on "Rendering PDF"
Expected behavior I expect the image being rendered.
Desktop (please complete the following information):