React Pdf not working on iOS
See original GitHub issueI’m using React-pdf, which works fine on chrome, both on desktop and android devices but doesn’t seem to work on iPhone ( both chrome and safari ) and mac safari. What is the solution for this?
import { Document, Page, pdfjs } from 'react-pdf/dist/esm/entry.webpack'
<Document
options={{
cMapUrl: `//cdn.jsdelivr.net/npm/pdfjs-dist@${pdfjs.version}/cmaps/`,
cMapPacked: true,
}}
file={url}
onLoadSuccess={onDocumentLoadSuccess}
>
<Page pageNumber={pageNumber} />
</Document>
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
React PDF not rendering PDF in IOS 15.5 - Stack Overflow
A quick fix would be to change renderMode to svg which just renders the SVG. SVG takes a bit more time to load...
Read more >react-pdf examples - CodeSandbox
Learn how to use react-pdf by viewing and forking react-pdf example apps on CodeSandbox.
Read more >How to Build a PDF Viewer with React Native PDF | PDFTron
In this blog, we show how to build a PDF viewer in React Native with react-native-view-pdf to render PDFs on Android and WKWebView...
Read more >React-pdf
Since a renderer simply implements how elements render into something, you still need to have React to make it work (and react-dom for...
Read more >Open a PDF in React on the Web with react-pdf - PSPDFKit
However, at the time of writing, the latter is only used to create PDFs. react-pdf provides a React-based component API for opening PDF...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I got it fixed by downgrading react-pdf from the latest to version 4.2.0.
This ticket belongs to https://github.com/wojtekmaj/react-pdf