diegomura / diegomura/react-pdf

Image overlapping with text

Open
#3,144 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

I'm trying to put an Image inside View:
`

`

and import the components:
import { Text, View, Link, Image } from "@react-pdf/renderer";

styles: {
imageWrapper: {
height: 300,
backgroundColor: "black"
},
image: {
marginVertical: 15,
width: 540,
height: 300,
borderRadius: 8
},
}`

I noticed the issue occurs when I try to render it with:
`img: ({ src }) => {
return (



);
}`

As you can see in the attached screenshot, the height for is not working, making the image overlap with the text.

![Image](https://github.com/user-attachments/assets/63ba1250-c337-43d6-9f70-350cb2dfa702)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.