1 | initial version |
No, it is possible to upload a local PDF file on react-native-view-pdf. You can use the "source" prop to specify the path of the local PDF file. Here is an example:
import React from 'react';
import { View } from 'react-native';
import PDFView from 'react-native-view-pdf';
const MyPDFViewer = () => {
return (
<View style={{ flex: 1 }}>
<PDFView
source={{ uri: '/path/to/local/file.pdf' }}
style={{ flex: 1 }}
/>
</View>
);
};
export default MyPDFViewer;
Note that the path to the file should be relative to the root folder of your project.