Click or drag to resize
Pdf Library for .NET

PdfResizeManagerSecurity Property

Gets the security settings of the resized document - passwords, permissions and encryption.

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public PdfDocumentSecurity Security { get; }

Property Value

PdfDocumentSecurity
Remarks
Starts as the loaded document's own security. The resized document is protected with these settings when KeepOriginalPageSettings is true, or when any of them is changed after the document is loaded; otherwise it is written without encryption. Clear both passwords to write it unprotected either way. The owner password of an encrypted document can only be kept when that document was loaded with its owner password - loaded with the user password, it is not known. Available after a document is loaded.
Example
PdfResizeManager manager = new PdfResizeManager();
manager.Load("a4.pdf");
manager.Security.UserPassword = "user";
manager.Security.OwnerPassword = "owner";
manager.Security.CanCopyContent = false;
manager.Save("protected.pdf");
See Also