Skip to content

fix: fixed unbound lineHeight during rendering - #3498

Open
Silvenga wants to merge 1 commit into
diegomura:masterfrom
Silvenga:fix-dynamic-render
Open

fix: fixed unbound lineHeight during rendering#3498
Silvenga wants to merge 1 commit into
diegomura:masterfrom
Silvenga:fix-dynamic-render

Conversation

@Silvenga

Copy link
Copy Markdown

When using <Text render={() => "blah"} /> the lineHeight multiplies unbounded during the rendering process - causing (I believe) the element to be clipped out, no longer present visually or within the PDF text.

The fix in this PR is to stop the recalculation loop of going to higher and higher multiples of lineHeight by, on the first pass, convert the value to an absolute value.

Resolves #3083 and #3402

@changeset-bot

changeset-bot Bot commented Aug 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 50d8038

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 11 packages
Name Type
@react-pdf/stylesheet Patch
@react-pdf/layout Patch
@react-pdf/types Patch
@react-pdf/render Patch
@react-pdf/renderer Patch
@react-pdf/font Patch
@react-pdf/math Patch
@react-pdf/mermaid Patch
next-14 Patch
next-15 Patch
@react-pdf/vite-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Silvenga
Silvenga force-pushed the fix-dynamic-render branch from 4fa46c1 to 50d8038 Compare August 18, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using lineHeight combined with a "render" function causes text not to render

1 participant