cyntler / react-doc-viewer

File viewer for React.
https://cyntler.github.io/react-doc-viewer
Apache License 2.0
391 stars 127 forks source link

Not able to render Word document #287

Open nikhilguptagl opened 2 months ago

nikhilguptagl commented 2 months ago

I am trying to load PDF and Word-Document into my project

import DocViewer, { DocViewerRenderers } from '@cyntler/react-doc-viewer';
import '@cyntler/react-doc-viewer/dist/index.css';

function DocViewerFile() {
  const docs = [
    {
      uri: 'http://10.6.0.219/testing/1ZBF000043R1001.docx',
    },
  ];

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

export default DocViewerFile;

Above code loads PDF successfully - with the PDF hosted on the same link but it is not able to load Word Document. Any idea what is missing here.

NOTE - http://10.6.0.219 is a minio blob repository.

devAbreu commented 2 months ago

Hello, @nikhilguptagl

If the url you are providing is publicly accessible, then it should work. Otherwise it won't work at all.

Guggilam-sai-prabhat commented 4 weeks ago

Are you able to render docx file @nikhilguptagl