Load Document for PDFTron react native

Hi,
I am trying to update/re-load the document from the server when I click on sync button. Onclick the document to reflect changes made on other devices too.
Currently I am able to see changes when I reopen pdftron i.e. document is “re-loaded” from props.

I tried using this.forceUpdate(); but it didn’t reload the document from the URL.

Is there an api [such as docViewer.loadDocument(); in webviewer] that I can use to reload the document from URL in react-native? Any other alternative you can suggest?

Here’s my code snippet

return (
            <View style={{ flex: 1 }}>
                <DocumentView
                    document={filepath} //URL
                />
                <View style={styles.button}>
                    <Button
                        onPress={() => {
                            // Updates document changes in server
                            this.saveAnnotations(); 
                            this.forceUpdate(); ---> Doesnot reload the document
                        }}
                        title="Sync"
                    />
                </View>
                </View>
        );

Thanks.

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hi,

Yes, please check this API:
https://www.pdftron.com/api/web/Core.DocumentViewer.html#loadDocument__anchor

Thanks.

Wanbo