Which product are you using?
PDF.js Express Viewer
PDF.js Express Version
|UI version|‘8.3.2’|
|Core version|‘8.3.0’|
|Build|‘My8xNi8yMDIyfDJiMGM2Y2IyZA==’|
|WebViewer Server|false|
|Full API|false|
Detailed description of issue
Even though I entered the PdfJs.Express license key, the watermark in the docs still remains. What do I have to do to get the Watermaks remove?
Expected behaviour
{Provide a screenshot or description of the expected behaviour}
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
var currentPage = 0;
WebViewer({
path: “/Scripts/viewer/”,
initialDoc: “@ViewBag.PdfFileUrl”,
licenseKey: “mgyOU8FJzV1fx6x8CRWp”,
}, document.getElementById(‘viewer’))
.then(instance => {
const { Core, UI, docViewer } = instance;
const { Tools, documentViewer} = Core;
const panTool = Tools.ToolNames.PAN;
UI.setToolMode(panTool);
UI.disableElements(["AnnotationCreateSticky", "AnnotationCreateFreeText", "leftPanel", "leftPanelButton", "toolbarGroup-Edit", "toolbarGroup-View", "toolbarGroup-Annotate", "toolbarGroup-Shapes", "toolbarGroup-Insert", "toolbarGroup-FillAndSign", "toggleNotesButton", "themeChangeButton", "searchButton", "viewControlsButton", "moreButton", "printButton", "menuButton", "toolsHeader"]);
//instance.UI.enableElements(["menuButton"]);
UI.setHeaderItems((header) => {
header.getHeader('default').push({
img: "icon-header-download",
index: -1,
type: "actionButton",
element: 'downloadButton',
onClick: () => {
instance.UI.downloadPdf()
}
});
header.getHeader('default').push({
img: "icon-header-print-line",
index: -1,
type: "actionButton",
element: 'printButton',
onClick: () => {
instance.UI.print()
}
});
});
UI.setLanguage("@(string.IsNullOrEmpty(Request.QueryString["language"]) || string.IsNullOrEmpty(Request.QueryString["language"]) ? "tr" : Request.QueryString["language"])");
UI.setTheme("@(ViewBag.Theme)");
documentViewer.addEventListener('pageNumberUpdated', (pageNumber) => {
currentPage = pageNumber;
const totalPage = docViewer.getPageCount();
var element = document.getElementById("approve");
if (currentPage == totalPage) {
element.removeAttribute("disabled");
element.classList.remove("disabled");
} else {
element.setAttribute("disabled", "disabled");
element.classList.add("disabled");
}
});
});
</script>