I am using mupdf library and I am deleting PDF Annotations and then saving the document using save method in PDFDocument.
Document doc = Document.openDocument(pdf