Save edited document on the same server with javascript

Hello team, I have programmed a button to download the modified or signed pdf, I would like to know if a copy of the modified pdf can be stored on the same server, it can be with javascript or php or both.

    instance.setHeaderItems(header => {
      type: 'actionButton',
      img : '/wp-content/themes/woffice/download-btn.png',
      onClick: async () => {
        const xfdfString = await annotManager.exportAnnotations();
        const saveOptions = CoreControls.SaveOptions;
        const options = {
          filename: 'myDocument.pdf',
          flags: saveOptions.LINEARIZED,
          downloadType: 'pdf'


Hey Julio,

There are a few steps required to get the blob from WebViewer, which can be found in this guide.

There is also some sample JavaScript code in this guide to help save the blobs.

Let me know if you have any more questions,


Hi Liam, thanks for the answer, I have managed to implement it with js and php.

I have an additional consultation, no way to apply some adjustment in the document to not allow editing after haver downloaded the document?

For example this is a document that I have downloaded but it allows me to edit the document.


You should be able to put the document into Read Only mode:

You can also programatically disable specific functionality: