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:
- generate new license
- double check key
- 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()
}
});
});
});
}
}}