Package com.evopdf
Class PdfSecurityOptions
java.lang.Object
com.evopdf.PdfSecurityOptions
This class encapsulates the options to control the PDF document security
options. The HtmlToPdfConverter class define a reference to an object of this
type in pdfSecurityOptions() property.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the flag indicating if you can assemble the PDF document generated by the HTML to PDF converter (create bookmarks, thumbnail images or insert, rotate, delete pages).boolean
Gets the flag indicating if you can copy the PDF document accessibility content of the PDF document generated by the HTML to PDF converter.boolean
Gets the flag indicating if you can copy the content of the PDF document generated by the HTML to PDF converter.boolean
Gets the flag indicating if you can edit the annotations of the PDF document generated by the HTML to PDF converter.boolean
Gets the flag indicating if you can edit the content of the PDF document generated by the HTML to PDF converter.boolean
Gets the flag indicating if you can fill the form fields in the PDF document generated by the HTML to PDF converter.boolean
canPrint()
Gets the flag indicating if you can print the PDF document generated by the HTML to PDF converter.boolean
Gets the flag indicating if you can print in high resolution the PDF document generated by the HTML to PDF converter.Gets encryption algorithm used to encrypt the PDF document generated by the HTML to PDF converterkeySize()
Gets the dimension of the encryption key in the PDF document generated by the HTML to PDF converter.Gets the password required to change permissions of the PDF document generated by the HTML to PDF converter, like printing or editing.void
setCanAssembleDocument
(boolean canAssemble) Sets the flag indicating if you can assemble the PDF document generated by the HTML to PDF converter (create bookmarks, thumbnail images or insert, rotate, delete pages).void
setCanCopyAccessibilityContent
(boolean canCopy) Sets the flag indicating if you can copy the accessibility content of the PDF document generated by the HTML to PDF converter.void
setCanCopyContent
(boolean canCopy) Sets the flag indicating if you can copy the content of the PDF document generated by the HTML to PDF converter.void
setCanEditAnnotations
(boolean canEdit) Sets the flag indicating if you can edit the annotations of the PDF document generated by the HTML to PDF converter.void
setCanEditContent
(boolean canEdit) Sets the flag indicating if you can edit the content of the PDF document generated by the HTML to PDF converter.void
setCanFillFormFields
(boolean canFill) Sets the flag indicating if you can fill the form fields in the PDF document generated by the HTML to PDF converter.void
setCanPrint
(boolean canPrint) Sets the flag indicating if you can print the PDF document generated by the HTML to PDF converter.void
setCanPrintHighResolution
(boolean canPrint) Sets the flag indicating if you can print in high resolution the PDF document generated by the HTML to PDF convertervoid
setEncryptionAlgorithm
(EncryptionAlgorithm encryptionAlgorithm) Sets encryption algorithm used to encrypt the PDF document generated by the HTML to PDF converter.void
setKeySize
(EncryptionKeySize size) Sets the dimension of the encryption key in the PDF document generated by the HTML to PDF converter.void
setOwnerPassword
(String password) Sets the password required to change permissions of the PDF document generated by the HTML to PDF converter, like printing or editing.void
setUserPassword
(String password) Sets the password required to open the PDF document generated by the HTML to PDF converter.Gets the password required to open the PDF document generated by the HTML to PDF converter.
-
Constructor Details
-
PdfSecurityOptions
public PdfSecurityOptions()
-
-
Method Details
-
canAssembleDocument
public boolean canAssembleDocument()Gets the flag indicating if you can assemble the PDF document generated by the HTML to PDF converter (create bookmarks, thumbnail images or insert, rotate, delete pages).- Returns:
- the flag indicating if you can assemble the generated PDF document
-
setCanAssembleDocument
public void setCanAssembleDocument(boolean canAssemble) Sets the flag indicating if you can assemble the PDF document generated by the HTML to PDF converter (create bookmarks, thumbnail images or insert, rotate, delete pages). This property has effect when a 128 bit key is used.- Parameters:
canAssemble
- the flag value to set
-
canCopyContent
public boolean canCopyContent()Gets the flag indicating if you can copy the content of the PDF document generated by the HTML to PDF converter.- Returns:
- the flag indicating if you can copy the content of the generated PDF document
-
setCanCopyContent
public void setCanCopyContent(boolean canCopy) Sets the flag indicating if you can copy the content of the PDF document generated by the HTML to PDF converter.- Parameters:
canCopy
- the flag value to set
-
canCopyAccessibilityContent
public boolean canCopyAccessibilityContent()Gets the flag indicating if you can copy the PDF document accessibility content of the PDF document generated by the HTML to PDF converter.- Returns:
- the flag indicating if you can copy the PDF document accessibility content
-
setCanCopyAccessibilityContent
public void setCanCopyAccessibilityContent(boolean canCopy) Sets the flag indicating if you can copy the accessibility content of the PDF document generated by the HTML to PDF converter.- Parameters:
canCopy
- the flag value to set
-
canEditAnnotations
public boolean canEditAnnotations()Gets the flag indicating if you can edit the annotations of the PDF document generated by the HTML to PDF converter.- Returns:
- the flag indicating if you can edit the annotations of the generated PDF document
-
setCanEditAnnotations
public void setCanEditAnnotations(boolean canEdit) Sets the flag indicating if you can edit the annotations of the PDF document generated by the HTML to PDF converter.- Parameters:
canEdit
- the flag value to set
-
canEditContent
public boolean canEditContent()Gets the flag indicating if you can edit the content of the PDF document generated by the HTML to PDF converter.- Returns:
- the flag indicating if you can edit the content of the generated PDF document
-
setCanEditContent
public void setCanEditContent(boolean canEdit) Sets the flag indicating if you can edit the content of the PDF document generated by the HTML to PDF converter.- Parameters:
canEdit
- the flag value to set
-
canFillFormFields
public boolean canFillFormFields()Gets the flag indicating if you can fill the form fields in the PDF document generated by the HTML to PDF converter.- Returns:
- the flag indicating if you can fill the forms of the generated PDF document
-
setCanFillFormFields
public void setCanFillFormFields(boolean canFill) Sets the flag indicating if you can fill the form fields in the PDF document generated by the HTML to PDF converter. This property has effect when a 128 bit key is used. To disable form filling thesetCanEditContent(boolean)
andsetCanEditAnnotations(boolean)
must be set on false.- Parameters:
canFill
- the flag value to set
-
canPrint
public boolean canPrint()Gets the flag indicating if you can print the PDF document generated by the HTML to PDF converter.- Returns:
- the flag indicating if you can print the generated PDF document
-
setCanPrint
public void setCanPrint(boolean canPrint) Sets the flag indicating if you can print the PDF document generated by the HTML to PDF converter. When this property is set to false the printing of the PDF document is disabled in a PDF viewer.- Parameters:
canPrint
- the flag value to set
-
canPrintHighResolution
public boolean canPrintHighResolution()Gets the flag indicating if you can print in high resolution the PDF document generated by the HTML to PDF converter.- Returns:
- the flag indicating if you can print in high resolution the generated PDF document
-
setCanPrintHighResolution
public void setCanPrintHighResolution(boolean canPrint) Sets the flag indicating if you can print in high resolution the PDF document generated by the HTML to PDF converter- Parameters:
canPrint
- the flag value to set
-
keySize
Gets the dimension of the encryption key in the PDF document generated by the HTML to PDF converter.- Returns:
- the encryption key size
-
setKeySize
Sets the dimension of the encryption key in the PDF document generated by the HTML to PDF converter. By default a 128 bit key is used.- Parameters:
size
- the encryption key size to set
-
encryptionAlgorithm
Gets encryption algorithm used to encrypt the PDF document generated by the HTML to PDF converter- Returns:
- the encryption algorithm
-
setEncryptionAlgorithm
Sets encryption algorithm used to encrypt the PDF document generated by the HTML to PDF converter. The default algorithm is RC4- Parameters:
encryptionAlgorithm
- the encryption algorithm
-
ownerPassword
Gets the password required to change permissions of the PDF document generated by the HTML to PDF converter, like printing or editing.- Returns:
- the owner password
-
setOwnerPassword
Sets the password required to change permissions of the PDF document generated by the HTML to PDF converter, like printing or editing. If theownerPassword()
property is an empty string and theuserPassword()
is not empty, theownerPassword()
will be automatically assigned with the value fromuserPassword()
and when the PDF document is opened in the viewer using the user password (which is also the owner password) all the operations like printing, copying, etc will be allowed.- Parameters:
password
- the owner password to set
-
userPassword
Gets the password required to open the PDF document generated by the HTML to PDF converter.- Returns:
- the owner password
-
setUserPassword
Sets the password required to open the PDF document generated by the HTML to PDF converter. If theownerPassword()
property is an empty string and theuserPassword()
is not empty, theownerPassword()
will be automatically assigned with the value fromuserPassword()
and when the PDF document is opened in the viewer using the user password (which is also the owner password) all the operations like printing, copying, etc will be allowed.- Parameters:
password
- the owner password to set
-