Coder Social home page Coder Social logo

Docx is not working about react-doc-viewer HOT 7 CLOSED

alcumus avatar alcumus commented on May 30, 2024
Docx is not working

from react-doc-viewer.

Comments (7)

ilkou avatar ilkou commented on May 30, 2024 2

this library uses an external service to render documents, this external service cannot recognize local files,

Example:

external-service.com/src=http://localhost:8080/your-file.docx

in this case, the external-service has no access to your local files so u should provide a complete accessible URL,
something like:

http://your-website-name:8080/your-file.docx

OR

http://your-IP-address:8080/your-file.docx

from react-doc-viewer.

mattmogford-alcumus avatar mattmogford-alcumus commented on May 30, 2024 1

@akshayvdongave A custom renderer in the context of this package is very simple and documented.
A custom renderer for Microsoft files is 1000x more complex. The included Microsoft renderers will render uploaded documents , but not local documents.

from react-doc-viewer.

mattmogford-alcumus avatar mattmogford-alcumus commented on May 30, 2024

Duplicate of #66

from react-doc-viewer.

akshayvdongave avatar akshayvdongave commented on May 30, 2024

@mattmogford-alcumus
can you please give any sample code for custom renderer for docx or any type .
in documentation i got for image but i am got get solution for docx.
i want to show multiple type of documents so please help me for create custom renderer for docx

from react-doc-viewer.

MMahendra001ScaleTech avatar MMahendra001ScaleTech commented on May 30, 2024

Worked this way :
Give fileType
fileType: 'docx'

      const urlData = !!path ? [{ uri: path, fileType: 'docx' }] : [];

        <DocViewer
          className="doc-viewer"
          documents={urlData}
          config={{
            header: {
              disableHeader: false,
              disableFileName: false,
              retainURLParams: false,
            },
          }}
          pluginRenderers={DocViewerRenderers}
        />

from react-doc-viewer.

AjayIrkal23 avatar AjayIrkal23 commented on May 30, 2024

i am facing a issue with react-doc-viewer in nextjs i am getting this err

resolve you may need an appropriate loader to handle this file type , currently no loaders are configured to process this file."
please help

from react-doc-viewer.

prem-pachouri-infopro avatar prem-pachouri-infopro commented on May 30, 2024

@akshayvdongave This video may help you.
https://www.youtube.com/watch?v=E0aK6CKsSNg

from react-doc-viewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.