Hi Lior,
If you want to change the original PDF then you'll need to store a copy of the original PDF on your server. At the time that you want to apply any permanent changes to the PDF you would have custom JavaScript code that would, for example, send a POST request to your server with information about the changes that you want to have applied to the original PDF. Maybe you would send your server something like this:
{
deletedPages: [1, 2, 3],
rotatedPages: [4]
}
Your server would receive this information and use PDFNet to delete and rotate those pages on the original PDF. Now that the original PDF is updated you can convert it to XOD using PDFNet and then if you like you can notify WebViewer to load the new XOD document.
It's up to you to implement a server end point that can receive messages like I mentioned above and run the necessary PDF code to update the PDF. Hopefully that clarifies what we're describing, but let us know if you have any further questions.
Matt Parizeau
Software Developer
PDFTron Systems Inc.