No license key was provided, running in demo mode

PDF.js Express Version
Core version 7.3.3

Detailed description of issue
No license key provided message on production environment, correct domain associated

Expected behaviour
Remove watermarks from PDFs

Does your issue happen with every document, or just one?
Issue happens with every document

Link to document
No link, downloads to local files

Code snippet

        let element = document.getElementById('viewer');
        WebViewer({
            licenseKey: 'my_licensekey',
            path: '/pdfjs-express',
            initialDoc: pdf_url,
            ui: 'legacy'
        }, element).then((instance) => {
       ....

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:

Guides:APIs:Forums:

Hi there,

Are you able to point me to the URL where you are seeing this issue? The only place we have an error message like that is in our rest API utilities - so I do not believe this is coming from Express itself.

Do you have some code like this somewhere?

import Utils from '@pdftron/pdfjs-express-utils'

const util = new Utils({})

Not providing license keys to this constructor will show that warning.

Thanks!
Logan

Yes, we have this

     import ExpressUtils from '@pdftron/pdfjs-express-utils'


            let element = document.getElementById('viewer');

            WebViewer({
                licenseKey: 'my_licensekey',
                path: '/pdfjs-express',
                initialDoc: pdf_url,
                ui: 'legacy'
            }, element).then((instance) => {
                const { docViewer, annotManager } = instance;
                this.webviewer_instance = instance;
                this.webviewer_instance.utils = new ExpressUtils()
                
            });

Where should we define again the license key?

Here you can access to a live page example:

https://searchlook.mx/webviewer?tkn=Im9tYXJlZDQ5MTJAaG90bWFpbC5jb20i.YP9qew.0iIOc9PEnVVPXim4VbgNhjHviBY

Hi there,

Thanks for the code and the link. I do not see a watermark on your viewing, which means your express key is working as expected.

The log you are seeing is coming from this line: this.webviewer_instance.utils = new ExpressUtils()

You are instantiating the library without an API key (which is OK - the log is just letting you know). Here are the docs for the library.

Thanks!
Logan

But all files are being received with the watermark text: “PDF.js Express Dev mode” in red color

Is it because no API key is provided?

Hi there,

Yes, the REST API needs a separate license key which you can get from PDF.js Express.

See this page for more info.

Thanks,
Logan