diegomura / diegomura/react-pdf

Unknown encoding: ascii in React Native

Open
#3,226 11 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

**Describe the bug**
Importing anything from react-pdf/renderer in React Native seems to throw an `ERROR RangeError: Unknown encoding: ascii (normalized: ascii), js engine: hermes`.

**To Reproduce**
`import { Document, Page } from "@react-pdf/renderer";`

Simply importing anything from react-pdf seems to throw the error, it is only eliminated when I remove all uses of react-pdf on Native. Everything works fine on the web using Expo Web.

**Expected behavior**
Importing and using react-pdf should work on React Native.

**Environment:**
- OS: iOS (26)
- React Native + Expo (v53), with New Architecture enabled
- React-pdf version: 4.3.1

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.