Which product are you using?
PDF.js Express Viewer
PDF.js Express Version
|UI version|‘8.7.0’|
|Core version|‘8.7.4’|
|webviewer.min.js|‘8.7.4’|
|Build|‘Ni8xNi8yMDIzfDhhZjQyYTgwOTU=’|
|WebViewer Server|false|
|Full API|false|
Detailed description of issue
I get the watermark when opening a pdf on an app that is hosted on myapp.azurewebsites.net. I have a license key for azurewebsites.net. I’m not getting any errors regarding missing or invalid licensekeys. Same for localhost but I understand that is normal behaviour
Expected behaviour
No watermark
Does your issue happen with every document, or just one?
Every document.
Link to document
{Provide a link to the document in question if possible}
Code snippet
import getUrlFromStream from '/js/streamUtils.js';
import '/js/pdfjsviewer/lib/webviewer.min.js';
export async function loadPdf(dotNetStreamReference) {
const pdfViewer = document.getElementById('pdf-viewer');
pdfViewer.style.width = '100%';
pdfViewer.style.height = '100vh';
const pdfUrl = await getUrlFromStream(dotNetStreamReference, 'application/pdf');
let licenseKey = getLicenseKey();
WebViewer({
path: '/js/pdfjsviewer/lib', // path to the PDF.js Express'lib' folder on your server
licenseKey: licenseKey,
initialDoc: pdfUrl,
}, document.getElementById('pdf-viewer'))
.then(instance => {
// stuff
});
}
getLicenseKey()
gets the license key for the corresponding environment.