Product: PDFTron WebViewer
Product Version: 8.3.2
Please give a brief summary of your issue:
How can I reuse an existing WebViewer instance in a modified DOM?
I have written a wrapper for the PDFTron WebViewer which allows to use it in combination with the SAP UI5 framework.
In certain situations the UI5 framework rerenders parts of the HTML and I want to reuse an already existing WebViewer instance.
Instead of creating a new instance
if (this._webViewerInstance) {
// reuse this._webViewerInstance ?????
} else {
void WebViewer(
{
path: "../pdftron/lib/public",
fullAPI: true,
initialDoc: null
},
this.getDomRef() as HTMLElement
).then(
(webViewer: WebViewerInstance) => {
this._webViewerInstance = webViewer;
}
);
}
I want to attach the existing instance stored in this._webViewerInstance to the new DOM. How can I achieve this?