I am using following code to apply custom stamp on a pdf document. Everything is working fine except on clicking save button, I am failing to save the changes.
The code I am using is as follows:
function addAnnotation() {
var pdfViewer = document.getElementById('pdfviewer').ej2_instances[0];
var pageCount = pdfViewer.viewerBase.pageCount;
for (var x = 0; x < pageCount; x++) {
pdfViewer.annotation.addAnnotation("Stamp", {
opacity: 0.5,
offset: { x: 200, y: 100 },
pageNumber: x + 1,
customStamps: [
{
customStampName: "Image",
customStampImageSource: "Image url"
}
]
})
}
pdfViewer.serverActionSettings.download = "SaveDocument";
pdfViewer.download();
pdfViewer.serverActionSettings.download = "Download";
}