 |
PdfResizeManagerSecurity Property |
Gets the security settings of the resized document - passwords, permissions and encryption.
Namespace: SelectPdf.UniversalAssembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntaxpublic PdfDocumentSecurity Security { get; }Public ReadOnly Property Security As PdfDocumentSecurity
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.
ExamplePdfResizeManager manager = new PdfResizeManager();
manager.Load("a4.pdf");
manager.Security.UserPassword = "user";
manager.Security.OwnerPassword = "owner";
manager.Security.CanCopyContent = false;
manager.Save("protected.pdf");Dim manager As New PdfResizeManager()
manager.Load("a4.pdf")
manager.Security.UserPassword = "user"
manager.Security.OwnerPassword = "owner"
manager.Security.CanCopyContent = False
manager.Save("protected.pdf")
See Also