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

textIndent leads to subsequent lines having their RHS reduced by same amount #2968

Open
Geod24 opened this issue Nov 19, 2024 · 0 comments
Open

Comments

@Geod24
Copy link

Geod24 commented Nov 19, 2024

Describe the bug

When using textIndent on a document (support added in #561 following issue #534), the first line of a paragraph is correctly indented, but subsequent lines have their right-hand-side reduced by textIndent value.

To Reproduce
Steps to reproduce the behavior including code snippet (if applies):

Go to the react-pdf REPL and change text's style to:

  text: {
    margin: 12,
    fontSize: 14,
    fontFamily: 'Times-Roman',
    textIndent: '50px'
  },

(Removing text-align: 'center' and adding textIndent).

Link to the snippet

Expected behavior

The first line is justified, the following lines are not and use all available vertical space.

Screenshots

Side-by-side comparison:
image

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Brave
  • React-pdf version: v4.0.1
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

1 participant