Watermark does not disappear after providing free license key

Which product are you using?
PDF.js Express Viewer

8.7.4

Detailed description of issue
{I provided free license key that I generated in my account inside the code, but still watermark appears on viewer. also tried this steps too but no success:

  1. generate new license
  2. double check key
  3. clear nginx cache}

Expected behaviour
{I expect watermark disappear after providing the license key}

Does your issue happen with every document, or just one?
{that’s happen all over the project, where I used pdf viewer}

Code snippet
{let pdfViewerInstance = null;
function pdfPreview(url) {
if (pdfViewerInstance) {
pdfViewerInstance.loadDocument(url);
} else {
WebViewer({
path: ${base1}/assets/pdfjs, // path to the PDF.js Express’lib’ folder on your server
licenseKey: ‘sBdJ86MKDbmwKGn07PS7’,
initialDoc: url, // You can also use documents on your server
}, document.getElementById(‘viewer’))
.then(instance => {
const docViewer = instance.docViewer;
const annotManager = instance.annotManager;
pdfViewerInstance = instance;
// call methods from instance, docViewer and annotManager as needed

            // you can also access major namespaces from the instance as follows:
            // const Tools = instance.Tools;
            // const Annotations = instance.Annotations;

            const {UI} = instance;

            UI.setHeaderItems((header) => {
                header.getHeader('default').push({
                    img: "icon-header-full-screen",
                    index: -1,
                    type: "actionButton",
                    element: 'fullScreenButton',
                    onClick: () => {
                        instance.UI.toggleFullScreen()
                    }
                });
            });
        });
}

}}

Hello Saleh,

Have you added a domain to the license key? The watermark is only removed in production.

Please also make sure you are using @pdftron/pdfjs-express-viewer and not @pdftron/pdfjs-express.

Hello Darian, yes I added domain to license, seems issue was using pdfjs-express I downloaded another one was named pdfjs-express-view-only and issue is solved now but page looks different and annotation does not work in that. anyway the issue is solved and that satisfy what I needed, thanks for your help :heartpulse:

1 Like