We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Disable Save option in PDF


I am trying to disable the Print and Save options available in the output PDF but on adding the below code, only Print feature is disabled. I am currently using Adobe Reader XI.

DocumentPrivilege privilege = DocumentPrivilege.ForbidAll;
privilege.AllowCopy = false;
privilege.AllowPrint = false;

PdfFileSecurity fileSecurity = new PdfFileSecurity(inputFilePath, outputFilePath);

Can you please let me know what i am missing here ?



Hi Smita,

Thanks for using our products and sorry for the delayed response.

Aspose.Pdf for .NET is based on Adobe PDF specifications and the requirement to disable Save option of PDF viewing application cannot be accomplished because this behavior depends upon the viewer application. We are sorry for this inconvenience.

PS, you may consider specifying the viewer preference of PDF file by using following code snippet.


PdfContentEditor editor = new

// bind the source PDF file


// set the viewer preference


// save updated document