Please give a brief summary of your issue:
How to access signature saved in device
Hello, I have some question with react-native-pdftron.
How can I access the saved signature in device? And for account management, sometimes we do not want certain user to see the saved signature in the same device (let say if a same device (android/ios) is used by 2 person that have their own account). Is it possible to save or load the signature elsewhere? (Maybe like in databases or phone secure async storage with unique name (expo))
Thank you very much.
We have an API for showing saved signatures, if this is set to false you should not see any saved signatures.
Please see here for more info: showSavedSignatures
I’d like to show (load) the saved signature based on the user who is using the app (by signing in first before using the app). So I would like to know if there are ways to save the signature somewhere else (like in secure async storage with custom defined storage name).
Thank you.
I already updated the library.
But I don’t know how I suppose to use the new added function (getSavedSignatures).
I tried to call the function via DocumentView ref (like viewer.current.getSavedSignatures()) but it won’t work.
Maybe can I get an example of how to use it?
Thank you very much.
=====================
Edit: This is how I used it.
===================
I get an error “TypeError: DocumentViewManager.getSavedSignatures is not a function. (In ‘DocumentViewManager.getSavedSignatures(tag)’, ‘DocumentViewManager.getSavedSignatures’ is undefined)”.
Could you please double check that you’ve updated to the latest version “2.0.3-beta.176”? “is not a function” likely means your version is not up to date. Thanks.
This is how I upgrade the package.
“yarn add github:PDFTron/pdftron-react-native”
and this what I get.
success Saved 1 new dependency.
info Direct dependencies
└─ react-native-pdftron@2.0.3-beta.177
info All dependencies
└─ react-native-pdftron@2.0.3-beta.177
============================
I also tried “yarn upgrade github:PDFTron/pdftron-react-native”
But the result still the same.
The function is already in DocumentView.js file.
Apparently I just need to re-install and rebuild the debug app again via “react-native run-android” then “react-native start”. Because before I just run the project via “react-native start” and then connect my phone with same WiFi and then use the “old” debug app to connect through my PC react native address to do some debugging and develop my application. Now the new function is working just fine as how it should be.