Which product are you using?
PDF.js Express Viewer
PDF.js Express Version
8.7.3
Detailed description of issue
Hi. If I have an instance const instance = getInstance();
- is there a way to recreate iframe if original iframe was destroyed when the modal was closed? I am showing PDF preview in a modal and after closing it the iframe disappears from DOM. But the instance is still there. I don’t really can instance.UI.loadDocument because I’m using config files and sending a blob from parent window to iframe and calling loadDocument from config file.
If every time I open modal I’ll call
PDFJSExpress(
{
path: 'patht/to/pdfJsViewer/public',
config: 'patht/to/pdfJsViewer/config.js',
licenseKey,
},
document.getElementById('pdf-container')
);
then I’ll have multiple viewer instances… Or is there a way how to detect from file config.js that the iFrame will be destroyed? Maybe some event or something else?