Click or drag to resize

Security Options

With the security options you have the possibility to allow or disallow printing, editing, copying, filling form fields, set a user password and an owner password. When you set a user password the PDF document is encrypted and that password will be asked by the PDF viewer in order to open the PDF document. When you set the owner password that password will be required when someone wants to change the PDF permissions.

The PdfSecurityOptions property of the PdfConverter object is used to manage the PDF document security option.

Below you can see a sample code which you can use to set the security options of the generated PDF document:

pdfConverter.PdfSecurityOptions.CanCopyContent = true;
pdfConverter.PdfSecurityOptions.CanEditContent = true;
pdfConverter.PdfSecurityOptions.CanFillFormFields = true;
pdfConverter.PdfSecurityOptions.CanPrint = true;
pdfConverter.PdfSecurityOptions.CanEditAnnotations = true;
pdfConverter.PdfSecurityOptions.CanAssembleDocument = true;

pdfConverter.PdfSecurityOptions.KeySize = EncryptionKeySize.EncryptKey128Bit;
pdfConverter.PdfSecurityOptions.UserPassword = "ExpertPDF";
pdfConverter.PdfSecurityOptions.OwnerPassword = "";