react-file-viewer icon indicating copy to clipboard operation
react-file-viewer copied to clipboard

Can't open a pdf file

Open var-bp opened this issue 7 years ago • 8 comments

Hi, get this error.

Deprecated API usage: getDocument is called with pdfDataRangeTransport, passwordCallback or progressCallback argument
Warning: Setting up fake worker.
Uncaught SyntaxError: Unexpected token <
Error: Loading chunk 0 failed at HTMLScriptElement.r (index.js:1)
index.js:1 Uncaught (in promise) Error: Loading chunk 0 failed at HTMLScriptElement.r (index.js:1)

I'm afraid react-file-viewer uses the old version of pdfjs-dist. UPD: Noticed another bug, #app get background: pink; UPD 2: Because of id, on one page can be only one instance of react-file-viewer

var-bp avatar Apr 18 '18 12:04 var-bp

I too am facing the same issue when trying to load a PDF file.

Hookkid avatar May 01 '18 16:05 Hookkid

Same problem here.

koczkadavid avatar May 22 '18 10:05 koczkadavid

This is very important file type to support, please fix it.

michaelfahmy avatar Jun 29 '18 18:06 michaelfahmy

You could edit in driver folder, pdf-viewer with another pdf view library, I would recommend react-pdf (https://github.com/diegomura/react-pdf) which we can custom UI design for PDF viewer controller

quynhnguyen68 avatar Jul 05 '18 03:07 quynhnguyen68

Hi guys, im writing here because Im facinge problem when opening pdf files and the error that i get is this one : "Each child in an array or iterator should have a unique "key" prop. Check the top-level render call using

. See https://fb.me/react-warning-keys for more information. in t"

What i get in the DOM is a white react file viewer div empty, any suggestion on how to resolve this?

LeonardoPlacanica avatar Sep 03 '18 18:09 LeonardoPlacanica

@LeonardoPlacanica I don't think the warning that you get has something to with the empty div...

did you resolve the issue? I'm having the same problem (empty div)

olenirwing avatar Nov 22 '18 14:11 olenirwing

Same issue here https://github.com/plangrid/react-file-viewer/issues/83#issuecomment-447170141

[HTTP/1.1 200 OK 0ms] Deprecated API usage: getDocument is called with pdfDataRangeTransport, passwordCallback or progressCallback argument

japrogramer avatar Dec 14 '18 02:12 japrogramer

You could edit in driver folder, pdf-viewer with another pdf view library, I would recommend react-pdf (https://github.com/diegomura/react-pdf) which we can custom UI design for PDF viewer controller

Hey, can you tell me how can I replace my pdf driver?

kaushiknishant avatar Jun 27 '20 06:06 kaushiknishant