org.apache.fop.pdf

## Class PDFEncryptionParams

- java.lang.Object
- - org.apache.fop.pdf.PDFEncryptionParams

-     public class PDFEncryptionParams
      extends java.lang.Object

  This class holds the parameters for PDF encryption.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PDFEncryptionParams()` Default constructor initializing to default values.
    `PDFEncryptionParams(PDFEncryptionParams source)` Creates a copy of the given encryption parameters.
    `PDFEncryptionParams(java.lang.String userPassword, java.lang.String ownerPassword, boolean allowPrint, boolean allowCopyContent, boolean allowEditContent, boolean allowEditAnnotations, boolean encryptMetadata)` Creates a new instance.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `encryptMetadata()` Indicates whether Metadata should be encrypted.
    `int` | `getEncryptionLengthInBits()` Returns the encryption length.
    `java.lang.String` | `getOwnerPassword()` Returns the owner password.
    `java.lang.String` | `getUserPassword()` Returns the user password.
    `boolean` | `isAllowAccessContent()` Indicates whether revision 3 extracting text and graphics is allowed.
    `boolean` | `isAllowAssembleDocument()` Indicates whether revision 3 assembling document is allowed.
    `boolean` | `isAllowCopyContent()` Indicates whether copying content is allowed.
    `boolean` | `isAllowEditAnnotations()` Indicates whether editing annotations is allowed.
    `boolean` | `isAllowEditContent()` Indicates whether editing content is allowed.
    `boolean` | `isAllowFillInForms()` Indicates whether revision 3 filling in forms is allowed.
    `boolean` | `isAllowPrint()` Indicates whether printing is allowed.
    `boolean` | `isAllowPrintHq()` Indicates whether revision 3 printing to high quality is allowed.
    `void` | `setAllowAccessContent(boolean allowAccessContent)` Sets whether revision 3 extracting text and graphics is allowed.
    `void` | `setAllowAssembleDocument(boolean allowAssembleDocument)` Sets whether revision 3 assembling document is allowed.
    `void` | `setAllowCopyContent(boolean allowCopyContent)` Sets the permission for copying content.
    `void` | `setAllowEditAnnotations(boolean allowEditAnnotations)` Sets the permission for editing annotations.
    `void` | `setAllowEditContent(boolean allowEditContent)` Sets the permission for editing content.
    `void` | `setAllowFillInForms(boolean allowFillInForms)` Sets whether revision 3 filling in forms is allowed.
    `void` | `setAllowPrint(boolean allowPrint)` Sets the permission for printing.
    `void` | `setAllowPrintHq(boolean allowPrintHq)` Sets whether revision 3 printing to high quality is allowed.
    `void` | `setEncryptionLengthInBits(int encryptionLength)` Sets the encryption length.
    `void` | `setEncryptMetadata(boolean encryptMetadata)` Whether the Metadata should be encrypted or not; default is true;
    `void` | `setOwnerPassword(java.lang.String ownerPassword)` Sets the owner password.
    `void` | `setUserPassword(java.lang.String userPassword)` Sets the user password.
    `java.lang.String` | `toString()`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PDFEncryptionParams

          public PDFEncryptionParams(java.lang.String userPassword,
                                     java.lang.String ownerPassword,
                                     boolean allowPrint,
                                     boolean allowCopyContent,
                                     boolean allowEditContent,
                                     boolean allowEditAnnotations,
                                     boolean encryptMetadata)

      Creates a new instance.
      Parameters:
        `userPassword` - the user password
        `ownerPassword` - the owner password
        `allowPrint` - true if printing is allowed
        `allowCopyContent` - true if copying content is allowed
        `allowEditContent` - true if editing content is allowed
        `allowEditAnnotations` - true if editing annotations is allowed

    - #### PDFEncryptionParams

          public PDFEncryptionParams()

      Default constructor initializing to default values.

    - #### PDFEncryptionParams

          public PDFEncryptionParams(PDFEncryptionParams source)

      Creates a copy of the given encryption parameters.
      Parameters:
        `source` - source encryption parameters

  - ### Method Detail

    - #### isAllowCopyContent

          public boolean isAllowCopyContent()

      Indicates whether copying content is allowed.
      Returns:
        true if copying is allowed

    - #### isAllowEditAnnotations

          public boolean isAllowEditAnnotations()

      Indicates whether editing annotations is allowed.
      Returns:
        true is editing annotations is allowed

    - #### isAllowEditContent

          public boolean isAllowEditContent()

      Indicates whether editing content is allowed.
      Returns:
        true if editing content is allowed

    - #### isAllowPrint

          public boolean isAllowPrint()

      Indicates whether printing is allowed.
      Returns:
        true if printing is allowed

    - #### isAllowFillInForms

          public boolean isAllowFillInForms()

      Indicates whether revision 3 filling in forms is allowed.
      Returns:
        true if revision 3 filling in forms is allowed

    - #### isAllowAccessContent

          public boolean isAllowAccessContent()

      Indicates whether revision 3 extracting text and graphics is allowed.
      Returns:
        true if revision 3 extracting text and graphics is allowed

    - #### isAllowAssembleDocument

          public boolean isAllowAssembleDocument()

      Indicates whether revision 3 assembling document is allowed.
      Returns:
        true if revision 3 assembling document is allowed

    - #### isAllowPrintHq

          public boolean isAllowPrintHq()

      Indicates whether revision 3 printing to high quality is allowed.
      Returns:
        true if revision 3 printing to high quality is allowed

    - #### encryptMetadata

          public boolean encryptMetadata()

      Indicates whether Metadata should be encrypted.
      Returns:
        true or false

    - #### getOwnerPassword

          public java.lang.String getOwnerPassword()

      Returns the owner password.
      Returns:
        the owner password, an empty string if no password applies

    - #### getUserPassword

          public java.lang.String getUserPassword()

      Returns the user password.
      Returns:
        the user password, an empty string if no password applies

    - #### setAllowCopyContent

          public void setAllowCopyContent(boolean allowCopyContent)

      Sets the permission for copying content.
      Parameters:
        `allowCopyContent` - true if copying content is allowed

    - #### setAllowEditAnnotations

          public void setAllowEditAnnotations(boolean allowEditAnnotations)

      Sets the permission for editing annotations.
      Parameters:
        `allowEditAnnotations` - true if editing annotations is allowed

    - #### setAllowEditContent

          public void setAllowEditContent(boolean allowEditContent)

      Sets the permission for editing content.
      Parameters:
        `allowEditContent` - true if editing annotations is allowed

    - #### setAllowPrint

          public void setAllowPrint(boolean allowPrint)

      Sets the permission for printing.
      Parameters:
        `allowPrint` - true if printing is allowed

    - #### setAllowFillInForms

          public void setAllowFillInForms(boolean allowFillInForms)

      Sets whether revision 3 filling in forms is allowed.
      Parameters:
        `allowFillInForms` - true if revision 3 filling in forms is allowed.

    - #### setAllowAccessContent

          public void setAllowAccessContent(boolean allowAccessContent)

      Sets whether revision 3 extracting text and graphics is allowed.
      Parameters:
        `allowAccessContent` - true if revision 3 extracting text and graphics is allowed

    - #### setAllowAssembleDocument

          public void setAllowAssembleDocument(boolean allowAssembleDocument)

      Sets whether revision 3 assembling document is allowed.
      Parameters:
        `allowAssembleDocument` - true if revision 3 assembling document is allowed

    - #### setAllowPrintHq

          public void setAllowPrintHq(boolean allowPrintHq)

      Sets whether revision 3 printing to high quality is allowed.
      Parameters:
        `allowPrintHq` - true if revision 3 printing to high quality is allowed

    - #### setEncryptMetadata

          public void setEncryptMetadata(boolean encryptMetadata)

      Whether the Metadata should be encrypted or not; default is true;
      Parameters:
        `encryptMetadata` - true or false

    - #### setOwnerPassword

          public void setOwnerPassword(java.lang.String ownerPassword)

      Sets the owner password.
      Parameters:
        `ownerPassword` - The owner password to set, null or an empty String if no password is applicable

    - #### setUserPassword

          public void setUserPassword(java.lang.String userPassword)

      Sets the user password.
      Parameters:
        `userPassword` - The user password to set, null or an empty String if no password is applicable

    - #### getEncryptionLengthInBits

          public int getEncryptionLengthInBits()

      Returns the encryption length.
      Returns:
        the encryption length

    - #### setEncryptionLengthInBits

          public void setEncryptionLengthInBits(int encryptionLength)

      Sets the encryption length.
      Parameters:
        `encryptionLength` - the encryption length

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.