Class SecurityManager
-
Constructor Summary
ConstructorDescriptionSecurityManager
(InternalPdfDocument internalPdfDocument) Please get SecurityManager byPdfDocument.getSecurity()
instead. -
Method Summary
Modifier and TypeMethodDescriptionGets the advanced security settings for this PDF document.final String
Gets the owner password and enables 128-bit encryption of PDF content.final String
Gets a Password used to protect and encrypt the PDF File.void
makePdfDocumentReadOnly
(String ownerPassword) Makes this PDF document read only such that:final void
Removes all user and owner password security for a PDF document.final void
setOwnerPassword
(String value) Sets the owner password and enables 128-bit encryption of PDF content.final void
setPassword
(String value) Sets a Password used to protect and encrypt the PDF File.void
setSecurityOptions
(SecurityOptions securityOptions) Sets advanced security settings for the PDF.
-
Constructor Details
-
SecurityManager
Please get SecurityManager byPdfDocument.getSecurity()
instead.- Parameters:
internalPdfDocument
- the internal pdf document
-
-
Method Details
-
getOwnerPassword
Gets the owner password and enables 128-bit encryption of PDF content.An owner password enables other security settings.
OwnerPassword must be set to a non-empty string value for AllowUserCopyPasteContent, AllowUserAnnotation, AllowUserFormData, AllowUserPrinting, AllowUserEdits to be restricted. -
setOwnerPassword
Sets the owner password and enables 128-bit encryption of PDF content.An owner password enables other security settings.
OwnerPassword must be set to a non-empty string value for AllowUserCopyPasteContent, AllowUserAnnotation, AllowUserFormData, AllowUserPrinting, AllowUserEdits to be restricted. -
getPassword
Gets a Password used to protect and encrypt the PDF File.Setting a password will cause IronPDF to automatically protect the PDF file content using strong 128-bit encryption.
-
setPassword
Sets a Password used to protect and encrypt the PDF File.Setting a password will cause IronPDF to automatically protect the PDF file content using strong 128-bit encryption.
Setting the password to null will remove any existing password.
-
removePasswordsAndEncryption
public final void removePasswordsAndEncryption()Removes all user and owner password security for a PDF document. Also disables content encryption.If content is encrypted at 128 bit, copy and paste of content, annotations and form editing may be disabled.
-
makePdfDocumentReadOnly
Makes this PDF document read only such that:- Content is encrypted at 128 bit.
- Copy and paste of content is disallowed.
- Annotations and form editing are disabled.- Parameters:
ownerPassword
- The owner password for the PDF. A string for owner password is required to enable PDF encryption and all document security options.
-
setSecurityOptions
Sets advanced security settings for the PDF.Allows the developer to control: user access passwords, encryption, and also who may edit, print and copy content from the PDF document
- Parameters:
securityOptions
- Advanced security settings for this PDF as an instance ofSecurityOptions
-
getCurrentSecurityOptions
Gets the advanced security settings for this PDF document.Allows the developer to control: user access passwords, encryption, and also who may edit, print and copy content from the PDF document
-