Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Text aligned center and continued

See original GitHub issue

Hi! In react-pdf we need to render inline texts (for what we use the continued option) that can be also centered in the page. However, when both conditions are present, the render output is not correct. Is there any way to achieve this? Maybe I’m missing something.

We cannot join all strings before render them because there might be a link in the middle of the text string.

screen shot 2018-02-03 at 6 42 54 pm

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

liborm85commented, Apr 29, 2019

Code to reproduce:

var doc = new PDFDocument();
var stream = doc.pipe(blobStream());

doc.text('Lorem ipsum', {continued: true, align: 'center'});
doc.text('Lorem ipsum', {continued: true, align: 'center'});

stream.on('finish', function() {
  iframe.src = stream.toBlobURL('application/pdf');
jbdemontecommented, Apr 28, 2022

issue is still there 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

text-align - CSS: Cascading Style Sheets - MDN Web Docs
The text-align CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box.
Read more >
Align or justify text - Microsoft Support
You can align text with margins in Word, including left, center, right, and justified.
Read more >
flexbox: set align-items center but text will continue to the ...
Well, its not pretty, but its a working solution: setting the text height to a fixed value, which is 1 line of text...
Read more >
Why You Should Never Center Align Paragraph Text
Left aligned text is easier to read than centered text for paragraphs. This is because when you center your text, the starting place...
Read more >
Text Alignment in Web Design: To Center or Not?
When Should I Center Text? · Headers – Centering a topic header or headline will set it apart from the rest of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found