diegomura / diegomura/react-pdf

PDFViewer not working in mobile browsers?

Open
#714 54 comments 29 reactions 0 assignees View on GitHub
blocked bug
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

**Describe the bug**

It seems that displaying a PDF document inside the `` component is not working on mobile browsers (tested with Chrome and Firefox on Android).

**To Reproduce**

I created a simple demo create-react-app with the example PDF document from the react-pdf getting started guide: https://github.com/jhilden/react-pdf-demo

**Expected behavior**

That the PDF is rendered and displayed just like in desktop browsers.

**Screenshots**

Chrome 76.0.03809.132 on Android
![image](https://user-images.githubusercontent.com/69657/64719792-4c972680-d4c9-11e9-8e0a-29f8bb6a6629.png)

Clicking on the "Open" button will just open a new blank tab.

Firefox 68.1 on Android
![image](https://user-images.githubusercontent.com/69657/64719898-85cf9680-d4c9-11e9-9943-b78b23901bff.png)

react-pdf version `1.6.4`

Is this a known issue? If yes, it should probably be documented here https://react-pdf.org/components#pdfviewer
And in that case it would be good to know how to test if the current environment supports `PDFViewer`. So one could e.g. use `` instead, which is working fine in the those mobile browsers.

Or is this a bug that should normally be working?

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.