Issue rendering borders with bun
Describe the bug At work we use the library to create a dynamic receipt which in its styles has borders set, if we set the border without a unit with just border: 1 it fails to render but with no error, instead if we add the unit border: "1px" the problem is fixed. Previously we've been using node as runtime but some time ago migrated to bun.
To Reproduce Steps to reproduce the behavior including code snippet (if applies):
- Create an app with bun
- Create a Document with a View component with its styles containing a border without specifying the unit
- Use the PDFDownloadLink and pass your document
You can make use of react-pdf REPL to share the snippet
Expected behavior When link is clicked PDF is downloaded
Desktop (please complete the following information):
- OS: macOS
- Browser: all of them
- React-pdf version: 4.2.2
Since the latest versions, you need to specify the units, therefore, your styles
Before
<View
style={{
borderBottom: "1 solid #b50000",
}}
>
After
<View
style={{
borderBottom: "1pt solid #b50000", // See the pt unit
}}
>
@Andres6936 yap, that's the solution I described in the issue. Would you please update documentation to make it clear its required? The article you linked it says pts are the default but not specifying it makes it crash.