Creating password-protected PDFs on Android
A PDF document can be encrypted to protect its contents from unauthorized access.
val task = PdfProcessorTask.fromDocument(document)
// Create default document save options.var documentSaveOptions = document.getDefaultDocumentSaveOptions()// This will create an encrypted password-protected document.documentSaveOptions.password = "password"
// Use created save options when processing the document.PdfProcessor.processDocumentAsync(task, outputFile, documentSaveOptions)final PdfProcessorTask task = PdfProcessorTask.fromDocument(document);
// Create default document save options.DocumentSaveOptions documentSaveOptions = document.getDefaultDocumentSaveOptions();// This will create an encrypted password-protected document.documentSaveOptions.setPassword("password");
// Use created save options when processing the document.PdfProcessor.processDocumentAsync(task, outputFile, documentSaveOptions); 
  
  
  
 