We are trying to apply image watermark into the viewer and after applying the image and below are the issue we have faced.
- When I click next or previous using the viewer button then the document becomes Blur in the viewer. I have attached the viewer source as well as the Blur screen shot for your reference.
- Scroll the viewer then the watermark image is showing multiple times in a page.
var canvasid = null;
canvasid = "#canvas" + pageIndex.toString();
var canvasheight = me.getPageContainer(pageIndex)[0].clientHeight;
var canvaswidth = me.getPageContainer(pageIndex)[0].clientWidth;
var height = parseInt(canvasheight);
var width = parseInt(canvaswidth);
var pageContainer = me.getPageContainer(pageIndex);
var type = "pdf";
var imagewidth;
var imageheight;
if (type == ".xls" || type == ".xlsx") {
imagewidth = width / 2;
imageheight = height / 2;
}
else if (type == ".ppt" || type == ".pptx") {
imagewidth = width / 2 - 140;
imageheight = height / 2;
}
else {
if (width <= 300 || height <= 300) {
imagewidth = width / 2;
imageheight = height / 2;
}
else {
imagewidth = 300;
imageheight = 300;
}
}
pageContainer.append('<div id="divcenter" style="top: 0px; width: ' + width + 'px; height: ' + height + 'px; position:relative;display: table-cell; z-index: 30; vertical-align: middle;opacity: 0.3;text-align: center;"><img style="height: ' + imageheight + 'px;width: ' + imagewidth + 'px;" src="
https://s3.amazonaws.com/contents2016/google_logo.jpg" alt=""/></div>');
Can you please provide a solution to resolve the issue.