Android
ComPDFKit PDF SDK
Guides

Save a Document                             

 

Save the Document.

//First, see whether the document has been modified. If there are any modifications, save it.
if (document.hasChanges()) {
boolean res;
//Save to original document
res = document.save();
//Save to the specified path; isRemoveSecurity indicates whether to delete the password of the document.
//res = document.saveAs(uri, isRemoveSecurity);
}
//Close the document and release resources
document.close();

 

Note: This is a time-consuming process, so it needs to be executed in a sub-thread. After the process is completed, the document closing process is executed in the main thread (such as destroying the Activity).