public class SecurityOptions extends Object
Allows the developer to control user access passwords, encryption, and also who may edit, print and copy content from the PDF document
Constructor and Description |
---|
SecurityOptions()
Instantiates a new Security options.
|
Modifier and Type | Method and Description |
---|---|
PdfEditSecurity |
getAllowUserEdits()
Gets allow user edits.
|
PdfPrintSecurity |
getAllowUserPrinting()
Gets allow user printing.
|
String |
getOwnerPassword()
Gets owner password.
|
String |
getUserPassword()
Gets user password.
|
Boolean |
isAllowUserAnnotations()
Is allow user annotations boolean.
|
Boolean |
isAllowUserCopyPasteContent()
Is allow user copy and paste content boolean.
|
Boolean |
isAllowUserCopyPasteContentForAccessibility()
Is allow user copy and paste content for accessibility boolean.
|
Boolean |
isAllowUserFormData()
Is allow user form data boolean.
|
void |
setAllowUserAnnotations(Boolean value)
Sets allow user annotations.
|
void |
setAllowUserCopyPasteContent(Boolean value)
Sets allow user copy and paste content.
|
void |
setAllowUserCopyPasteContentForAccessibility(Boolean value)
Sets allow user copy and paste content for accessibility.
|
void |
setAllowUserEdits(PdfEditSecurity value)
Sets allow user edits.
|
void |
setAllowUserFormData(Boolean value)
Sets allow user form data.
|
void |
setAllowUserPrinting(PdfPrintSecurity value)
Sets allow user printing.
|
void |
setOwnerPassword(String value)
Sets owner password.
|
void |
setUserPassword(String value)
Sets user password.
|
public SecurityOptions()
Allows the developer to control user access passwords, encryption, and also who may edit, print and copy content from the PDF document
public final Boolean isAllowUserAnnotations()
If
AllowUserAnnotations is set false, the setOwnerPassword(String)
must be set for the security measure to take effect.
public final void setAllowUserAnnotations(Boolean value)
If
AllowUserAnnotations is set false, the setOwnerPassword(String)
must be set for the security measure to take effect.
value
- the valuepublic final Boolean isAllowUserCopyPasteContent()
If AllowUserCopyPasteContent is set false, the
setOwnerPassword(String)
must also be set for the security measure
to take effect.
public final void setAllowUserCopyPasteContent(Boolean value)
If AllowUserCopyPasteContent is set false, the
setOwnerPassword(String)
must also be set for the security measure
to take effect.
value
- the valuepublic final Boolean isAllowUserCopyPasteContentForAccessibility()
public final void setAllowUserCopyPasteContentForAccessibility(Boolean value)
value
- the valuepublic final PdfEditSecurity getAllowUserEdits()
If editing rights
are restricted, then the setOwnerPassword(String)
must be set for
the security measure to take effect.
public final void setAllowUserEdits(PdfEditSecurity value)
If editing rights
are restricted, then the setOwnerPassword(String)
must be set for
the security measure to take effect.
value
- the valuepublic final Boolean isAllowUserFormData()
If AllowUserFormData is set false, the setOwnerPassword(String)
must be set for the security measure to take effect.
Note. If you want to make the form
readonly in Adobe Acrobat Reader please call
Security_Api.makePdfDocumentReadOnly(InternalPdfDocument, String)
method or set
setAllowUserEdits(PdfEditSecurity)
to
PdfEditSecurity.NO_EDIT
and set
setOwnerPassword(String)
.
public final void setAllowUserFormData(Boolean value)
If AllowUserFormData is set false, the setOwnerPassword(String)
must be set for the security measure to take effect.
Note. If you want to make the form
readonly in Adobe Acrobat Reader please call
Security_Api.makePdfDocumentReadOnly(InternalPdfDocument, String)
method or set
setAllowUserEdits(PdfEditSecurity)
to
PdfEditSecurity.NO_EDIT
and set
setOwnerPassword(String)
.
value
- the valuepublic final PdfPrintSecurity getAllowUserPrinting()
If print rights are
restricted, then the setOwnerPassword(String)
must be set for the
security measure to take effect.
public final void setAllowUserPrinting(PdfPrintSecurity value)
If print rights are
restricted, then the setOwnerPassword(String)
must be set for the
security measure to take effect.
value
- the valuepublic final String getOwnerPassword()
OwnerPassword must be set to a non
empty string value for setAllowUserCopyPasteContent(Boolean)
,
setAllowUserAnnotations(Boolean)
,
setAllowUserFormData(Boolean)
and
setAllowUserEdits(PdfEditSecurity)
to be restricted.
public final void setOwnerPassword(String value)
OwnerPassword must be set to a non
empty string value for setAllowUserCopyPasteContent(Boolean)
,
setAllowUserAnnotations(Boolean)
,
setAllowUserFormData(Boolean)
and
setAllowUserEdits(PdfEditSecurity)
to be restricted.
value
- the valuepublic final String getUserPassword()
A user password is a password that each user must enter to open or print the PDF document.
public final void setUserPassword(String value)
A user password is a password that each user must enter to open or print the PDF document.
value
- the valueCopyright © 2022–2023 Iron Software. All rights reserved.