How to use Express Viewer in Electron with license key

I’m using PDF.js Express Viewer 8.1.1

Detailed description of issue
When I tried to use PDF.js Express Viewer in my Electron application, I found that even though I set the License Key correctly in WebViewerOptions, Electron still failed to render the document properly and reported the following error.

This is how I set the License Key in WebViewer.

This is the information of License Key in my Profile page.

Expected behaviour
In addition to the Electron app, I also have a web version built from the same code. The domain name of the web version, which is tied to the License Key, is already registered on the Profile page. The web version can open PDF documents normally, but Electron cannot. So I am wondering if this problem is due to the existence of the domain binding, so that PDF.js Express does not recognize the document open in Electron.

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:


Hi there,

License keys are domain locked meaning they can only be used from a web browser. PDF.js Express will not work in an Electron app because Electron apps do not have a domain name.

If you need to use a viewer in an Electron app, you can check out our sister product PDFTron WebViewer, whos license keys are not domain locked.


I truly cannot understand why the free version of Express Viewer has to be tied to a Domain. While I know my request may be rather groundless, I would like to ask if there are any plans to remove this restriction in the future?


As per the PDF.js Express license agreement - PDF.js Express may only be used in a single, web based application - hence the domain lock. Packing and distributing PDF.js Express as part of a desktop application is against the license terms.

We do not have any plans to remove the domain name requirement. However, we are working on a new type of license key that is not domain locked (OEM keys) - we will have this available in the near future.