Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to load PDF or Word doc #162

Open
nikhilguptagl opened this issue Sep 1, 2024 · 2 comments
Open

Not able to load PDF or Word doc #162

nikhilguptagl opened this issue Sep 1, 2024 · 2 comments

Comments

@nikhilguptagl
Copy link

nikhilguptagl commented Sep 1, 2024

I am using this code to load a pdf,

import DocViewer, { DocViewerRenderers } from 'react-doc-viewer';

function DocViewerFile() {
  const docs = [
    {
      uri: 'http://10.6.0.220/testing2/560RCR01_DS_en.pdf',
    },
  ];

  return <DocViewer pluginRenderers={DocViewerRenderers} documents={docs} />;
}

export default DocViewerFile;

but I am not able to load that pdf on browser. This is the screenshot -
image

http://10.6.0.220/testing2/560RCR01_DS_en.pdf is the valid link- I see a PDF on the browser when I put this URL in the browser directly.

Any idea, what is missing here.

@girmahertali
Copy link

I'm trying to use the above package but, I'm having same issue me too

@rsun-babu
Copy link

pdfjs-dist folder is missing under utils.

Tried copying the files and folder which is visible in node_modules [in the same heirarchy of the build folder]. Didnt work

8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants