diegomura / diegomura/react-pdf
PDFViewer component in Next.js renders blank page when using custom fonts from local project
- Dominant language
- TypeScript
- Stars
- 16.8k
- Forks
- 1.3k
- Avg merge
- 5h 6m
- Merged PRs (30d)
- 52
Description
**Describe the bug**
When attempting to use custom fonts from my local project in the PDFViewer component of react-pdf within a Next.js application, the rendered page appears blank with no content.
**To Reproduce**
Steps to reproduce the behavior including code snippet (if applies):
1- Create a Next.js project.
2- Import and register a custom font from the local project using Font.register.
3- Apply the custom font to the PDFViewer component or any text element within it.
4- Render the PDFViewer component in a Next.js page.
5- Notice that the rendered page is blank with no visible content.
**Expected behavior**
The PDFViewer component in the Next.js application should render the content with the applied custom font correctly, displaying the text using the specified font.
**Screenshots**

**Desktop (please complete the following information):**
- OS: Windows
- Browser chrome
- React-pdf version 3.1.9
- Next js 12.0.7
- React 17.0.2
Contributor guide
Assessment
This issue has not been assessed yet.