Spaces at the beginning of strings are not rendering for <Text /> components
Author: TomSenapatiInfluenceCreated Jun 14, 2024Updated Sep 19, 2026
Labelsbug
Describe the bug Spaces at the beginning of strings inside Text components are not being reproduced into the rendered pdf. Instead, the text node begins with the first character of the string. If a string starts with multiple spaces, only a single space is rendered in the pdf. Similarly, if a string starts with any number of spaces, followed by a number/special character the spaces are completely ignored. The only case that seems to render accurately is if the string starts with a single space, followed by an a-z character.
MacOS, Chrome
Source: diegomura/react-pdf