Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List text is broken up by hyphens #96

Open
rohit8 opened this issue Jun 16, 2024 · 2 comments
Open

List text is broken up by hyphens #96

rohit8 opened this issue Jun 16, 2024 · 2 comments

Comments

@rohit8
Copy link

rohit8 commented Jun 16, 2024

I'm seeing this html rendering issue with v2.0.4.

Given children:

<ul><li>Testing 1 2 3</li></ul>

The list text is unnecessarily broken up on to new lines.

Screenshot 2024-06-15 at 9 08 24 PM

While paragraph text renders correctly:

<p>Testing 1 2 3</p>

Output:

Screenshot 2024-06-15 at 9 09 56 PM

Other dependencies:
react-pdf: 9
@react-pdf/renderer: 3.4.4

@danomatic
Copy link
Owner

@rohit8 is your Html element wrapped in other react-pdf elements? I wonder if it's inheriting parent styles or being constrained by a parent width.

@vdor
Copy link

vdor commented Aug 2, 2024

@rohit8 I had the same issue with li tags

Solved by setting specific width for the Html element - <Html style={{ width: '100%' }}>{description}</Html>
Either downgrade to the 1.1.21 version

@danomatic 2b9d02e
image

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

No branches or pull requests

3 participants