Class EncryptionSettings

java.lang.Object
org.jpedal.constants.EncryptionSettings

public final class EncryptionSettings extends Object
Holds settings used for document encryption.

JPedal writes encrypted PDFs with a security handler of revision 6 so the settings here apply to that revision.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Query Returns whether document assembly operations are permitted.
    boolean
    Query Returns whether metadata streams will be encrypted.
    boolean
    Query Returns whether text and graphics extraction is permitted.
    boolean
    Query Returns whether existing interactive form fields may be filled in.
    boolean
    Query Returns whether annotations and interactive form fields may be modified.
    boolean
    Query Returns whether modifications other than annotation, form filling, and document assembly are permitted.
    boolean
    Query Returns whether printing the document is permitted.
    boolean
    Query Returns whether high-fidelity printing is permitted.
    void
    setAssembleDocument(boolean assembleDocument)
    Set whether document assembly operations are permitted.
    void
    setEncryptMetadata(boolean encryptMetadata)
    Indicates whether metadata streams should be encrypted.
    void
    setExtractTextGraphics(boolean extractTextGraphics)
    Set whether text and graphics extraction is permitted.
    void
    setFillForms(boolean fillForms)
    Set whether existing interactive form fields may be filled in.
    void
    setModifyAnnotationsForms(boolean modifyAnnotationsForms)
    Set whether annotations and interactive form fields may be modified.
    void
    setModifyOther(boolean modifyOther)
    Set whether modifications other than annotation, form filling, and document assembly are permitted.
    void
    setPrintDocument(boolean printDocument)
    Set whether printing the document is permitted.
    void
    setPrintHighFidelity(boolean printHighFidelity)
    Set whether high-fidelity printing is permitted.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EncryptionSettings

      public EncryptionSettings()
  • Method Details

    • isEncryptMetadata

      public boolean isEncryptMetadata()
      Query Returns whether metadata streams will be encrypted..

      Default value: true

      Returns:
      whether metadata streams will be encrypted
    • setEncryptMetadata

      public void setEncryptMetadata(boolean encryptMetadata)
      Indicates whether metadata streams should be encrypted.

      Default value: true

      Parameters:
      encryptMetadata - whether to encrypt metadata streams
    • isPrintDocument

      public boolean isPrintDocument()
      Query Returns whether printing the document is permitted..

      Printing may still be limited to low-quality output if isPrintHighFidelity() is not set.

      Default value: true

      Returns:
      whether printing the document is permitted
    • setPrintDocument

      public void setPrintDocument(boolean printDocument)
      Set whether printing the document is permitted.

      Printing may still be limited to low-quality output if isPrintHighFidelity() is not set.

      Default value: true

      Parameters:
      printDocument - whether printing the document is permitted
    • isModifyOther

      public boolean isModifyOther()
      Query Returns whether modifications other than annotation, form filling, and document assembly are permitted..

      Controlled operations excluded from this setting are isModifyAnnotationsForms(), isFillForms(), and isAssembleDocument().

      Default value: true

      Returns:
      whether modifications other than annotation, form filling, and document assembly are permitted
    • setModifyOther

      public void setModifyOther(boolean modifyOther)
      Set whether modifications other than annotation, form filling, and document assembly are permitted.

      Controlled operations excluded from this setting are isModifyAnnotationsForms(), isFillForms(), and isAssembleDocument().

      Default value: true

      Parameters:
      modifyOther - whether other document modifications are permitted
    • isExtractTextGraphics

      public boolean isExtractTextGraphics()
      Query Returns whether text and graphics extraction is permitted..

      Default value: true

      Returns:
      whether text and graphics extraction is permitted
    • setExtractTextGraphics

      public void setExtractTextGraphics(boolean extractTextGraphics)
      Set whether text and graphics extraction is permitted.

      Default value: true

      Parameters:
      extractTextGraphics - whether text and graphics extraction is permitted
    • isModifyAnnotationsForms

      public boolean isModifyAnnotationsForms()
      Query Returns whether annotations and interactive form fields may be modified..

      If isModifyOther() is also set, interactive form fields (including signature fields) may additionally be created or modified.

      Default value: true

      Returns:
      whether annotations and interactive form fields may be modified
    • setModifyAnnotationsForms

      public void setModifyAnnotationsForms(boolean modifyAnnotationsForms)
      Set whether annotations and interactive form fields may be modified.

      If isModifyOther() is also set, interactive form fields (including signature fields) may additionally be created or modified.

      Default value: true

      Parameters:
      modifyAnnotationsForms - whether annotation and form modification is permitted
    • isFillForms

      public boolean isFillForms()
      Query Returns whether existing interactive form fields may be filled in..

      This includes signature fields, even if isModifyAnnotationsForms() is not set.

      Default value: true

      Returns:
      whether existing interactive form fields may be filled in
    • setFillForms

      public void setFillForms(boolean fillForms)
      Set whether existing interactive form fields may be filled in.

      This includes signature fields, even if isModifyAnnotationsForms() is not set.

      Default value: true

      Parameters:
      fillForms - whether filling existing form fields is permitted
    • isAssembleDocument

      public boolean isAssembleDocument()
      Query Returns whether document assembly operations are permitted..

      This includes inserting, rotating, or deleting pages, and creating document outline items or thumbnail images, even if isModifyOther() is not set.

      Default value: true

      Returns:
      whether document assembly operations are permitted
    • setAssembleDocument

      public void setAssembleDocument(boolean assembleDocument)
      Set whether document assembly operations are permitted.

      This includes inserting, rotating, or deleting pages, and creating document outline items or thumbnail images, even if isModifyOther() is not set.

      Default value: true

      Parameters:
      assembleDocument - whether document assembly operations are permitted
    • isPrintHighFidelity

      public boolean isPrintHighFidelity()
      Query Returns whether high-fidelity printing is permitted..

      When this setting is false and isPrintDocument() is set, printing is limited to a lower-quality representation of the document.

      Default value: true

      Returns:
      whether high-fidelity printing is permitted
    • setPrintHighFidelity

      public void setPrintHighFidelity(boolean printHighFidelity)
      Set whether high-fidelity printing is permitted.

      When this setting is false and isPrintDocument() is set, printing is limited to a lower-quality representation of the document.

      Default value: true

      Parameters:
      printHighFidelity - whether high-fidelity printing is permitted