Closed alexaung closed 7 years ago
I alway got the error "Error while udating property 'src' of a view managed by "RCTPDFViewAndroid".
May I know how to set local file?
let pdfpath = require("../../../pdf/en/0.pdf")
<PDFView ref={(pdf)=>{this.pdfView = pdf;}} src={pdfpath} onLoadComplete = {(pageCount)=>{ this.pdfView.setNativeProps({ zoom: 1.5 }); }} style={styles.pdf}/>
Ok, I found the issue. src only support absolute path. It can only view from device's local storage file.
now how to show dynamic path ?
I alway got the error "Error while udating property 'src' of a view managed by "RCTPDFViewAndroid".
May I know how to set local file?
let pdfpath = require("../../../pdf/en/0.pdf")
<PDFView ref={(pdf)=>{this.pdfView = pdf;}} src={pdfpath} onLoadComplete = {(pageCount)=>{ this.pdfView.setNativeProps({ zoom: 1.5 }); }} style={styles.pdf}/>