Product: Web Viewer
Product Version: 11.1.1
We are loading file in the web viewer but getting performance issues with the below code:-
1- Web viewer initializing taking approx 3 sec. Below is the code:
WebViewer(
{
path: “…/…/…/js/lib/PdfTronWebViewer11.1.1/”,
enableMeasurement: true,
licenseKey: ‘license key’,
backendType: ‘ems’,
fullAPI: true,
annotationUser: 12345,
isAdminUser:true
}, viewer
).then(instance => {
});
2- When we are loading file approx 1MB in the Web-viewer with the help of ‘instance.UI.loadDocument’ function. It is also taking 3-4 seconds. Below is the code:
const arrayBuffer = xhr.response; // Note: not req.responseText
instance.UI.loadDocument(arrayBuffer);
I tried to load the file with the path but that is also taking same time. like below code:-
instance.UI.loadDocument("My pdf file path");
Please let me know why these are code taking too much time. Because of this code , My pdf file is loading very slow in the web viewer.
Please let me know What changes should I do to increase the performance of web viewer.
Thanks,
Rahul Y