import DocViewer from "react-doc-viewer"; function App() { const docs = [ { uri: "https://url-to-my-pdf.pdf" }, { uri: require("./example-files/pdf.pdf") }, // Local File ]; return <DocViewer documents={docs} />; }...
Example: constMyNoRenderer=({document,fileName})=>{constfileText=fileName||document?.fileType||"";if(fileText){returnNo Renderer Error! ({fileText});}returnNo Renderer Error!;};<DocViewerpluginRenderers={DocViewerRenderers}documents={{// ...}}config={{noRenderer:{overrideComponent:MyNo...
2.7.7 - "react": "^16.3.0-alpha.1","react-native": "0.54.3" 2.7.5 - Pull Request local file from LeMinh1995 + Pull Request podspec Form Linh1987 2.7.3 - Example Local File 2.7.2 - Progress Download Feedback in example and Done Button Callback IOS 2.7.1 - Fix Progress IOS Do...
2.在项目中添加一个名为`example.docx`的Word文档。 3.在项目根目录下创建一个名为`App.js`的文件,并将上述示例代码复制到`App.js`中。 4.执行`npm start`命令来运行React项目。 5.在浏览器中打开`localhost:3000`来查看React File Viewer的运行效果。 V.结论 React File Viewer是一个强大且易于使用的文件...
example/ReactDocViewerExample 修改为官方版本 6年前 ios 修改为官方版本 6年前 LICENSE 修改为官方版本 6年前 README.md 修改为官方版本 6年前 RNReactNativeDocViewer.podspec 修改为官方版本 6年前 RNReactNativeDocViewer.sln 修改为官方版本 6年前 ...
2.7.8 - XLS Exmaple Local File IOS 97-2003 2.7.7 - "react": "^16.3.0-alpha.1","react-native": "0.54.3" 2.7.5 - Pull Request local file from LeMinh1995 + Pull Request podspec Form Linh1987 2.7.3 - Example Local File 2.7.2 - Progress Download Feedback in example and Done Bu...
DocumentDirectoryPath; export default class DocumentViewerExample extends Component { constructor(props) { super(props); this.state = { animating: false, progress: "", donebuttonclicked: false, } this.eventEmitter = new NativeEventEmitter(NativeModules.RNReactNativeDocViewer); this.eventEmitter....
"forceConsistentCasingInFileNames": true, "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, // "noEmit": true, "jsx": "react" }, "include": ["src"], "exclude": [ "src/__tests__", "src/_example-files_", "src/serviceWorker.ts", "src/setupTests....
{ url:"https://storage.googleapis.com/need-sure/example", fileName:"sample", fileType:"xml", cache:true }], (error, url) => { if (error) { console.error(error); this.setState({animating: false}); } else { console.log(url) this.setState({animating: false}); } }) } } /*...
{ url:"https://storage.googleapis.com/need-sure/example", fileName:"sample", fileType:"xml" }], (error, url) => { if (error) { console.error(error); this.setState({animating: false}); } else { console.log(url) this.setState({animating: false}); } }) }else{ OpenFile.open...