White line on the bottom of the rendered PDF
Describe the bug
Not sure if its a bug... Iยดm trying to use an image as a background and It showing a white line on the bottom of the rendered pdf. Can't find a way to remove it, I have tried, many different page sizes and image sizes, the result is always the same.
If its not a bug, can you help somehow?
Thanks,
Can you provide a small snippet replicating this? I can't tell from just an image. Thanks!
Hi @diegomura ,
I can isolate the code just to this, and you will be able to replicate the issue:
` import React from 'react'; import { Page, Image, Document } from '@react-pdf/renderer'; import Background from '../../assets/images/diploma_background.png'
export const diploma = () => {
return (
< Document >
<Page size="A4" orientation="landscape">
<Image src={Background} />
</Page>
</Document >
)
} `
I also attach the background image

You need to set the image width and height to 100%. You can also use objectFit: "cover" or similar so it adjust to the container
thanks @diegomura , setting the width and height to 100% solved it. And thanks for the library, it works really nice and its really easy to use ๐ ๐