我有一个带有 expoGo 的应用程序,并使用 expo-file-system 将文件下载到用户的设备。 当我在在线模式下将文件路径传递给rn-pdf-reader-js时,一切正常,但在离线模式下,图书馆只是不呈现pdf。
<PDFReader
style={styles.reader}
customStyle={{
readerContainerZoomContainerButton: {
display: 'none',
},
}}
withPinchZoom={true}
withScroll={true}
noLoader={false}
source={{uri: magazine.pdf ? magazine.pdf : URL.MAGAZINE_PDF(magazine)}}
/>
哪里magazine.pdf看起来像“file:///Users/user/Library/Developer/CoreSimulator/Devices//data/Containers/Data/Application//Documents/ExponentExperienceData/%2540anonymous%252* */pdf2021-1.pdf"
我需要一个PDF离线显示
我尝试了很多方案:load base64,load component into webView; 但这一切都没用
@cawa TOCTOraH 你有没有解决你提到的问题?