Closed joepk90 closed 3 months ago
It looks like you confused React-PDF with @react-pdf/renderer. Please file an issue in their repo instead.
It looks like you confused React-PDF with @react-pdf/renderer. Please file an issue in their repo instead.
Ah, apologies - You are correct.
I will open an issue with @react-pdf/renderer 👍
Before you start - checklist
Description
Attempting to use React PDF on the server, with custom (
ttf
) fonts andesbuild
, throws an error:This setup works in the browser, so perhaps this is actually a problem (or incorrect configuration) with
esbuild
?However according the documentation, React PDF is meant to be compatible with
esbuild
, so I thought I would raise an issue here: https://react-pdf.org/compatibility#:~:text=Compatibility%20with%20esbuildSteps to reproduce
Clone the following repo:
Install dependancies:
Run the following command to see reproduce the error:
Expected behavior
The expectation is to be able to generate a PDF running when running the
make generate-pdf
. However the generation process fails due to the error described in this Issue descriptionActual behavior
The generation logic fails due to a font family failing to register.
Additional information
No response
Environment