Articles in this section
Category / Section

Is it possible to disable the "print" option displayed in the PDF document?

1 min read

 

Yes. It is possible to disable the "Print" options displayed on the PDF toolbar by encrypting the document.

C#

//Document security

PdfSecurity security = document.Security;

//use 128 bits key

security.KeySize = PdfEncryptionKeySize.Key128Bit;

security.OwnerPassword = "syncfusion";

security.Permissions = PdfPermissionsFlags.Default;

security.UserPassword = "password";

VB

''Document security

Dim security As PdfSecurity = document.Security

''use 128 bits key

security.KeySize = PdfEncryptionKeySize.Key128Bit

security.OwnerPassword = "syncfusion"

security.Permissions = PdfPermissionsFlags.CopyContent

security.UserPassword = "password"

Sample:

http://websamples.syncfusion.com/samples/KB/PDF.Windows/PPrint/main.htm

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment