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

Callback after PDF load #229

Open edavalosanaya opened 9 months ago

edavalosanaya commented 9 months ago

Great work, this library is a lifesaver!

Is there a way to provide a callback function after a PDF (or general document) is successful loaded?

Azzmeth commented 8 months ago

which ur i neeed to set const docs = [ { uri: 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf' }, //{ uri: require("./test.pdf")} //documentURI.startsWith is not a function ]; console.log("docViewer",docs) return (

<main>
    <DocViewer documents={docs} pluginRenderers={DocViewerRenderers} />

</main>

); im using this like there coming fetch error what i do

sulphite commented 1 month ago

Bumping this to say I would also really like a way to provide an onLoad callback or something