We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Having issue in saving custom stamps

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";

    }


1 Reply

CK Chinnamunia Karthik Chinna Thambi Syncfusion Team January 25, 2023 12:59 PM UTC

We were unable to reproduce the reported issue with the provided details. We have shared the sample in which we have tried to reproduce the issue in the below link,


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/CustomStampSample501744272.zip


Try this sample and if you are still facing any issues, please share the sample in which the issue is reproduced or modify the given sample. We found you have been used the custom save method in server side so please share the code snippets you have used in the SaveDocument method. This will be helpful for us to analyze further and provide the details.


Note: Make sure that you are using the same client and server versions. For the client-side, you need to update the respective version CDN links in the _Layout.cshtml. For the server-side, you need to update the Nuget Packages.


Loader.
Up arrow icon