Save modified PDF on server

Q: How do I save a modified PDF to server while using a standalone setup?

A: There are 2 ways you can do this:

  1. Save the whole PDF: You can export the modified PDF as an arrayBuffer using Instance#exportPDF. Then you can convert this arrayBuffer to blob and sent it to your server. You can see an example in the Sending the PDF to a server section.

  2. Save the changes only: If you just want to save the changes made by the user on the original PDF, you can use Instance#exportInstantJSON to export a JSON containing all the changes. You can store this separately and apply it when you load the original PDF next time using Configuration#instantJSON. With this approach you won’t have to repeatedly save the PDF file and you can use the original PDF everytime.

If you want to know how to do this on [Server-Backed mode][], read this guide.