Open EvHaus opened 5 months ago
Duplicate of https://github.com/diegomura/react-pdf/issues/2675?
Unfortunately no. I'm using restructure
version 3.0.0
and my issue still persists. :(
Hi @EvHaus
Add this to your overrides/resolutions
"resolutions": { "@react-pdf/layout": "3.6.4", "@react-pdf/textkit": "4.3.0", "@react-pdf/image": "2.2.2", "@react-pdf/pdfkit": "3.1.2", "restructure": "3.0.0" }
We had the same issues, having these fixed all of them. But we did have this exact issue, where they would not open up in Adobe. This fixed it.
Thanks for sharing @PelosiTech. Unfortunately those resolutions do not resolve this specific problem. Those resolutions fix https://github.com/diegomura/jay-peg/issues/4 and https://github.com/diegomura/react-pdf/issues/578 but does not fix this font problem.
Describe the bug
When rendering via Node.js and
renderToStream
, I can't seem to get any custom TTF fonts to work in Adobe Acrobat in the generated PDF. They work just fine in Chrome, Safari and other PDF viewers though.Interestingly, I cannot reproduce this using the REPL (which I believe doesn't browser rendering).
To Reproduce
Here is a sample PDF file that I generated. Try openening it in Chrome (it will work) and then in Adobe Acrobat (it will fail) with errors.
sample.pdf
The code for this file is:
Expected behavior
A PDF with text that renders in Adobe Acrobat.
Screenshots
This error shows on the first page
And then this one shows up after scrolling additional pages
Desktop (please complete the following information):