Package com.evopdf

# Class PdfSecurityOptions

java.lang.Object
com.evopdf.PdfSecurityOptions

public class PdfSecurityOptions extends Object
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
  Constructor
  Description
  `PdfSecurityOptions()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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).
  `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.
  `boolean`
  `canCopyContent()`
  Gets the flag indicating if you can copy the content of the PDF document generated by the HTML to PDF converter.
  `boolean`
  `canEditAnnotations()`
  Gets the flag indicating if you can edit the annotations of the PDF document generated by the HTML to PDF converter.
  `boolean`
  `canEditContent()`
  Gets the flag indicating if you can edit the content of the PDF document generated by the HTML to PDF converter.
  `boolean`
  `canFillFormFields()`
  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`
  `canPrintHighResolution()`
  Gets the flag indicating if you can print in high resolution the PDF document generated by the HTML to PDF converter.
  `EncryptionAlgorithm`
  `encryptionAlgorithm()`
  Gets encryption algorithm used to encrypt the PDF document generated by the HTML to PDF converter
  `EncryptionKeySize`
  `keySize()`
  Gets the dimension of the encryption key in the PDF document generated by the HTML to PDF converter.
  `String`
  `ownerPassword()`
  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 converter
  `void`
  `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.
  `String`
  `userPassword()`
  Gets the password required to open the PDF document generated by the HTML to PDF converter.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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 the `setCanEditContent(boolean)` and `setCanEditAnnotations(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

    public EncryptionKeySize 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

    public void setKeySize(EncryptionKeySize size)
    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

    public EncryptionAlgorithm encryptionAlgorithm()
    Gets encryption algorithm used to encrypt the PDF document generated by the HTML to PDF converter
    Returns:
      the encryption algorithm

  - ### setEncryptionAlgorithm

    public void setEncryptionAlgorithm(EncryptionAlgorithm encryptionAlgorithm)
    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

    public String 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

    public 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. If the `ownerPassword()` property is an empty string and the `userPassword()` is not empty, the `ownerPassword()` will be automatically assigned with the value from `userPassword()` 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

    public String userPassword()
    Gets the password required to open the PDF document generated by the HTML to PDF converter.
    Returns:
      the owner password

  - ### setUserPassword

    public void setUserPassword(String password)
    Sets the password required to open the PDF document generated by the HTML to PDF converter. If the `ownerPassword()` property is an empty string and the `userPassword()` is not empty, the `ownerPassword()` will be automatically assigned with the value from `userPassword()` 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