Coder Social home page Coder Social logo

Comments (5)

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

Please could you provide an example of your code so that we can investigate further.

from react-doc-viewer.

jojonarte avatar jojonarte commented on May 31, 2024

@mattmogford-alcumus I'm encountering the same problem, here's a sample code that replicates this problem, the first PDF gets loaded, however the next doesn't even load, it's just stuck in loading state. However if you have a file of different type from the first loaded file, it will get loaded.


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

const Demo = () => {
  return (
   <DocViewer
        documents={[{
          uri: 'https://<PDFURLHERE>.pdf',
          fileType: 'pdf'
        }, {
          uri:  'https://<PDFURLHERE>.pdf',
          fileType: 'pdf'
        },
        {
         uri:  'https://<IMGURLHERE>.png', // this file gets loaded
         fileType: 'png' 
        }
        ]}
        pluginRenderers={DocViewerRenderers}
      />
  );
};

from react-doc-viewer.

ZeemZach avatar ZeemZach commented on May 31, 2024

Please could you provide an example of your code so that we can investigate further.

@mattmogford-alcumus - I have the same code structure as @jojonarte

from react-doc-viewer.

jojonarte avatar jojonarte commented on May 31, 2024

@mattmogford I've been investigating, I could get it to work by adding the currentDocument dependency here

}, [CurrentRenderer]);

However it results in an unending amount of re-renders

from react-doc-viewer.

jojonarte avatar jojonarte commented on May 31, 2024

adding currentFileNo seems to do the trick

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.