public class PdfSecurityOptions
extends java.lang.Object
| Constructor and Description |
|---|
PdfSecurityOptions()
The constructor of PdfSecurityOptions
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAccessibilityExtractContent()
Indicates whether to allow to extract text and graphics (in support of accessibility to users with disabilities or for other purposes).
|
boolean |
getAnnotationsPermission()
Indicates whether to allow to add or modify text annotations, fill in interactive form fields.
|
boolean |
getAssembleDocumentPermission()
Indicates whether to allow to assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images),
even if
getModifyDocumentPermission() is clear. |
boolean |
getExtractContentPermission()
Indicates whether to allow to copy or otherwise extract text and graphics from the document
by operations other than that controlled by
getAccessibilityExtractContent(). |
boolean |
getExtractContentPermissionObsolete()
Deprecated.
Use ExtractContentPermission property instead.
|
boolean |
getFillFormsPermission()
Indicates whether to allow to fill in existing interactive form fields (including signature fields),
even if
getModifyDocumentPermission() is clear. |
boolean |
getFullQualityPrintPermission()
Indicates whether to allow to print the document to a representation from
which a faithful digital copy of the PDF content could be generated.
|
boolean |
getModifyDocumentPermission()
Indicates whether to allow to modify the contents of the document by operations other than those controlled
by
getAnnotationsPermission(), getFillFormsPermission() and getAssembleDocumentPermission(). |
java.lang.String |
getOwnerPassword()
Gets the owner password for the encrypted PDF document.
|
boolean |
getPrintPermission()
Indicates whether to allow to print the document.
|
java.lang.String |
getUserPassword()
Gets the user password required for opening the encrypted PDF document.
|
void |
setAccessibilityExtractContent(boolean value)
Indicates whether to allow to extract text and graphics (in support of accessibility to users with disabilities or for other purposes).
|
void |
setAnnotationsPermission(boolean value)
Indicates whether to allow to add or modify text annotations, fill in interactive form fields.
|
void |
setAssembleDocumentPermission(boolean value)
Indicates whether to allow to assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images),
even if
getModifyDocumentPermission() is clear. |
void |
setExtractContentPermission(boolean value)
Indicates whether to allow to copy or otherwise extract text and graphics from the document
by operations other than that controlled by
getAccessibilityExtractContent(). |
void |
setExtractContentPermissionObsolete(boolean value)
Deprecated.
Use ExtractContentPermission property instead.
|
void |
setFillFormsPermission(boolean value)
Indicates whether to allow to fill in existing interactive form fields (including signature fields),
even if
getModifyDocumentPermission() is clear. |
void |
setFullQualityPrintPermission(boolean value)
Indicates whether to allow to print the document to a representation from
which a faithful digital copy of the PDF content could be generated.
|
void |
setModifyDocumentPermission(boolean value)
Indicates whether to allow to modify the contents of the document by operations other than those controlled
by
getAnnotationsPermission(), getFillFormsPermission() and getAssembleDocumentPermission(). |
void |
setOwnerPassword(java.lang.String value)
Sets the owner password for the encrypted PDF document.
|
void |
setPrintPermission(boolean value)
Indicates whether to allow to print the document.
|
void |
setUserPassword(java.lang.String value)
Sets the user password required for opening the encrypted PDF document.
|
public PdfSecurityOptions()
Example
The following code sets high resolution print permisson for the output pdf.
Workbook wb = new Workbook();
wb.getWorksheets().get(0).getCells().get("A1").setValue("Aspose");
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
PdfSecurityOptions pdfSecurityOptions = new PdfSecurityOptions();
//set owner password
pdfSecurityOptions.setOwnerPassword("YourOwnerPassword");
//set user password
pdfSecurityOptions.setUserPassword("YourUserPassword");
//set print permisson
pdfSecurityOptions.setPrintPermission(true);
//set high resolution for print
pdfSecurityOptions.setFullQualityPrintPermission(true);
pdfSaveOptions.setSecurityOptions(pdfSecurityOptions);
wb.save("output.pdf", pdfSaveOptions);
public java.lang.String getUserPassword()
Remarks
The owner password or user password will be required to open an encrypted PDF document for viewing.
The user password can be null or empty string, in this case no password will be required from the user when opening the PDF document.
Opening the document with the correct owner password allows full access to the document.
Opening the document with the correct user password (or opening a document that does not have a user password) allows limited access as the permissions specified.
public void setUserPassword(java.lang.String value)
Remarks
The owner password or user password will be required to open an encrypted PDF document for viewing.
The user password can be null or empty string, in this case no password will be required from the user when opening the PDF document.
Opening the document with the correct owner password allows full access to the document.
Opening the document with the correct user password (or opening a document that does not have a user password) allows limited access as the permissions specified.
public java.lang.String getOwnerPassword()
Remarks
The owner password allows the user to open an encrypted PDF document without any access restrictions specified.public void setOwnerPassword(java.lang.String value)
Remarks
The owner password allows the user to open an encrypted PDF document without any access restrictions specified.public boolean getPrintPermission()
Remarks
Possibly not at the highest quality level, depending on whethergetFullQualityPrintPermission() is also set.public void setPrintPermission(boolean value)
Remarks
Possibly not at the highest quality level, depending on whethergetFullQualityPrintPermission() is also set.public boolean getModifyDocumentPermission()
getAnnotationsPermission(), getFillFormsPermission() and getAssembleDocumentPermission().public void setModifyDocumentPermission(boolean value)
getAnnotationsPermission(), getFillFormsPermission() and getAssembleDocumentPermission().public boolean getExtractContentPermissionObsolete()
Remarks
NOTE: This member is now obsolete. Instead, please use ExtractContentPermission property. This property will be removed 12 months later since September 2023. Aspose apologizes for any inconvenience you may have experienced.public void setExtractContentPermissionObsolete(boolean value)
Remarks
NOTE: This member is now obsolete. Instead, please use ExtractContentPermission property. This property will be removed 12 months later since September 2023. Aspose apologizes for any inconvenience you may have experienced.public boolean getAnnotationsPermission()
Remarks
ifgetModifyDocumentPermission() is also set, create or modify interactive form fields (including signature fields).public void setAnnotationsPermission(boolean value)
Remarks
ifgetModifyDocumentPermission() is also set, create or modify interactive form fields (including signature fields).public boolean getFillFormsPermission()
getModifyDocumentPermission() is clear.public void setFillFormsPermission(boolean value)
getModifyDocumentPermission() is clear.public boolean getExtractContentPermission()
getAccessibilityExtractContent().public void setExtractContentPermission(boolean value)
getAccessibilityExtractContent().public boolean getAccessibilityExtractContent()
public void setAccessibilityExtractContent(boolean value)
public boolean getAssembleDocumentPermission()
getModifyDocumentPermission() is clear.public void setAssembleDocumentPermission(boolean value)
getModifyDocumentPermission() is clear.public boolean getFullQualityPrintPermission()
Remarks
When it is clear (andgetPrintPermission() is set), printing is limited to a low level
representation of the appearance, possibly of degraded quality.public void setFullQualityPrintPermission(boolean value)
Remarks
When it is clear (andgetPrintPermission() is set), printing is limited to a low level
representation of the appearance, possibly of degraded quality.See Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.