WebViewer Version: 10.1.1
Do you have an issue with a specific file(s)? no
Can you reproduce using one of our samples or online demos? n/a
Are you using the WebViewer server? no
Does the issue only happen on certain browsers? no
Is your issue related to a front-end framework? no
Is your issue related to annotations? no
Please give a brief summary of your issue:
Is it possible to create a custom UI without importing webviewer-core.min.js
into the Window and polluting the entire page? Our application is a SPA and I’d prefer not to load all of this code until it is needed.
It would be nice for something like this to be possible:
// Import/use Core from a module instead of the Window...
import { Core } from '@pdftron/webviewer';
Core.setWorkerPath('/pdftron');
const documentViewer = new Core.DocumentViewer();
documentViewer.setViewerElement(myElement);
documentViewer.loadDocument('test.pdf');