public class SecurityManager extends Object
Constructor and Description |
---|
SecurityManager(InternalPdfDocument internalPdfDocument)
Please get SecurityManager by
PdfDocument.getSecurity() instead. |
Modifier and Type | Method and Description |
---|---|
SecurityOptions |
getCurrentSecurityOptions()
Gets the advanced security settings for this PDF document.
|
String |
getOwnerPassword()
Gets the owner password and enables 128-bit encryption of PDF content.
|
String |
getPassword()
Gets a Password used to protect and encrypt the PDF File.
|
void |
makePdfDocumentReadOnly(String ownerPassword)
Makes this PDF document read only such that:
|
void |
removePasswordsAndEncryption()
Removes all user and owner password security for a PDF document.
|
void |
setOwnerPassword(String ownerPassword)
Sets the owner password and enables 128-bit encryption of PDF content.
|
void |
setPassword(String password)
Sets a Password used to protect and encrypt the PDF File.
|
void |
setSecurityOptions(SecurityOptions securityOptions)
Sets advanced security settings for the PDF.
|
public SecurityManager(InternalPdfDocument internalPdfDocument)
PdfDocument.getSecurity()
instead.internalPdfDocument
- the internal pdf documentpublic final String getOwnerPassword()
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.
public final void setOwnerPassword(String ownerPassword)
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.
ownerPassword
- public final String getPassword()
Setting a password will cause IronPDF to automatically protect the PDF file content using strong 128-bit encryption.
public final void setPassword(String password)
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.
password
- public final void removePasswordsAndEncryption()
If content is encrypted at 128 bit, copy and paste of content, annotations and form editing may be disabled.
public void makePdfDocumentReadOnly(String ownerPassword)
- Content is encrypted at 128 bit.
- Copy and paste of content is disallowed.
- Annotations and form editing are disabled.
ownerPassword
- The owner password for the PDF. A string for owner password is required
to enable PDF encryption and all document security options.public void setSecurityOptions(SecurityOptions securityOptions)
Allows the developer to control: user access passwords, encryption, and also who may edit, print and copy content from the PDF document
securityOptions
- Advanced security settings for this PDF as an instance of SecurityOptions
public SecurityOptions getCurrentSecurityOptions()
Allows the developer to control: user access passwords, encryption, and also who may edit, print and copy content from the PDF document
Copyright © 2022–2023 Iron Software. All rights reserved.