when I use the following code :
Code snippet
WebViewer({
path: ‘/resources/js/pdf_express’, // path to the PDF.js Express’lib’ folder
licenseKey: licenseKey,
initialDoc: src,
}, document.getElementById(‘pdf-js-express-viewer’)).then(instance => {
instance.UI.setTheme(instance.UI.Theme.DARK);
}
The page loads, but by default loads the light theme, and THEN refreshes with the dark theme. This flicker takes about a second and is very noticeable.
Is it possible when creating the WebViewer to create it with the dark theme? I’ve searched the docs and haven’t found a way to accomplish this.
The other thought would be to not display the WebViewer until it’s finished rendering to avoid the flicker of the theme change.
Thanks in advance for any suggestions.