christopherdro / christopherdro/react-native-html-to-pdf

images being cropped on iOS

Open
#324 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
461
Forks
273
PR merge metrics
No merged PRs in 30d

Description

i have an app that generates pdfs with lots of images dynamically, but on iOS some images are cut off between the pages when they exceed the height of the pdf. i've tried using the page-break-inside: avoid property, but the pdf doesn't respect this property. does anyone know how to solve this problem of images being cut off in the pdf on iOS? i'll leave a screenshot of the pdf below showing the cut image.

![Image](https://github.com/user-attachments/assets/94279f99-b057-4b03-beba-7847c218aef9)

```html
${fotos.map((foto, fotoIndex) => `
${foto.type !== 'video' ?
`






${foto.hora}



`
: '' }
`).join('')}

Contributor guide

Open the contributing guide

Research direction

Start with the provided HTML image markup and reproduce the PDF on iOS using an image taller than the remaining page space. Investigate how the renderer handles page-break-inside: avoid for the shown image container; done means images are no longer cut off across page boundaries.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.