Hopding / react-native-pdf-lib

Library for creating and editing PDFs in React Native.
https://www.npmjs.com/package/react-native-pdf-lib
189 stars 76 forks source link

Saving the pdf created from internal storage to external storage #91

Open nathan0519 opened 3 years ago

nathan0519 commented 3 years ago

Hi, I am looking to create a pdf using the createPDF and the function works fine but 1) I do not know how to view the created PDF and 2) I do not know how to move the created PDF from internal storage to external storage (so that it can be shared/viewed outside the app)

Thanks!

thekevinbrown commented 2 years ago

When it returns the path, you should be able to load the file from there, e.g. something like this:

<PDFPage pdfPath={`${RNFetchBlob.fs.dirs.DocumentDir}/${this.photoBook!.contentPDFPath!}`} />