1. Are you referring to the menu that appears above an annotation when it's selected? You can access the buttons from window.AnnotationEdit.buttons which is an array of the buttons. If you want to hide a button all the time you can could add code like the following to your config file:
var doneButton = window.AnnotationEdit.buttons[0];
doneButton.isHidden = function() {
return true;
};
If you're using XOD then you would need to persist the information about rotation on your server. One way to do it would be to send a request to your server with the information about the rotation for a particular page and then your server could store that and also give that information to the client when it loads a document (like WebViewer does with annotations) and then apply that rotation on the client side.
Another way to do it would be to still send a server request with the rotation information but apply it immediately to the associated PDF using PDFNet and then reconvert the PDF to XOD.
Let me know if that makes sense or if you need any further clarification.
Matt Parizeau
Software Developer
PDFTron Systems Inc.