How to default the WebViewer to the Dark theme

when I use the following code :

Code snippet
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 => {

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.

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hey there,

Unfortunately we don’t have this functionality at this point (which is an oversight on our end). I submitted a feature request to the team so hopefully they can build this in soon.