Class PDPropBuildDataDict

java.lang.Object
org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDPropBuildDataDict
All Implemented Interfaces:
COSObjectable

public class PDPropBuildDataDict extends Object implements COSObjectable
The general property dictionaries from the build property dictionary.
Author:
Thomas Chojecki
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Convert this standard java object to a COS dictionary.
    The build date of the software module.
    long
    The software module revision number, used to determinate the minimum version of software that is required in order to process this signature.
    The name of the software module that was used to create the signature.
    boolean
    If there is a LegalPDF dictionary in the catalog of the PDF file and the NonEmbeddedFonts attribute in this dictionary has a non zero value, and the viewing application has a preference set to suppress the display of this warning then the value of this attribute will be set to true.
    Indicates the operating system.
    boolean
    A flag that can be used by the signature handler or software module to indicate that this signature was created with unrelease software.
    long
    The software module revision number, corresponding to the Date attribute.
    boolean
    If true, the application was in trusted mode when signing took place.
    A text string indicating the version of the application implementation, as described by the /Name attribute in this dictionary.
    void
    The build date of the software module.
    void
    setMinimumRevision(long revision)
    The software module revision number, used to determinate the minimum version of software that is required in order to process this signature.
    void
    The name of the software module that was used to create the signature.
    void
    setNonEFontNoWarn(boolean noEmbedFontWarning)
    If true, the reader should not display a warning about fonts not being embedded.
    void
    Indicates the operating system.
    void
    setPreRelease(boolean preRelease)
    A flag that can be used by the signature handler or software module to indicate that this signature was created with unrelease software.
    void
    setRevision(long revision)
    The software module revision number, corresponding to the Date attribute.
    void
    setTrustedMode(boolean trustedMode)
    If true, the application was in trusted mode when signing took place.
    void
    setVersion(String applicationVersion)
    A text string indicating the version of the application implementation, as described by the Name attribute in this dictionary.

    Methods inherited from class java.lang.Object

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

    • PDPropBuildDataDict

      public PDPropBuildDataDict()
      Default constructor.
    • PDPropBuildDataDict

      public PDPropBuildDataDict(COSDictionary dict)
      Constructor.
      Parameters:
      dict - The signature dictionary.
  • Method Details

    • getCOSObject

      public COSDictionary getCOSObject()
      Convert this standard java object to a COS dictionary.
      Specified by:
      getCOSObject in interface COSObjectable
      Returns:
      The COS dictionary that matches this Java object.
    • getName

      public String getName()
      The name of the software module that was used to create the signature.
      Returns:
      the name of the software module
    • setName

      public void setName(String name)
      The name of the software module that was used to create the signature.
      Parameters:
      name - is the name of the software module
    • getDate

      public String getDate()
      The build date of the software module. This string is normally produced by the compiler that is used to compile the software, for example using the Date and Time preprocessor flags. As such, this not likely to be in PDF Date format.
      Returns:
      the build date of the software module
    • setDate

      public void setDate(String date)
      The build date of the software module. This string is normally produced by the compiler.
      Parameters:
      date - is the build date of the software module
    • setVersion

      public void setVersion(String applicationVersion)
      A text string indicating the version of the application implementation, as described by the Name attribute in this dictionary. When set by Adobe Acrobat, this entry is in the format: major.minor.micro (for example 7.0.7).

      NOTE: Version value is specific for build data dictionary when used as the App dictionary in a build properties dictionary.

      Parameters:
      applicationVersion - the application implementation version
    • getVersion

      public String getVersion()
      A text string indicating the version of the application implementation, as described by the /Name attribute in this dictionary. When set by Adobe Acrobat, this entry is in the format: major.minor.micro (for example 7.0.7).
      Returns:
      the application implementation version
    • getRevision

      public long getRevision()
      The software module revision number, corresponding to the Date attribute.
      Returns:
      the revision of the software module
    • setRevision

      public void setRevision(long revision)
      The software module revision number, corresponding to the Date attribute.
      Parameters:
      revision - is the software module revision number
    • getMinimumRevision

      public long getMinimumRevision()
      The software module revision number, used to determinate the minimum version of software that is required in order to process this signature.

      NOTE: this entry is deprecated for PDF v1.7

      Returns:
      the revision of the software module
    • setMinimumRevision

      public void setMinimumRevision(long revision)
      The software module revision number, used to determinate the minimum version of software that is required in order to process this signature.

      NOTE: this entry is deprecated for PDF v1.7

      Parameters:
      revision - is the software module revision number
    • getPreRelease

      public boolean getPreRelease()
      A flag that can be used by the signature handler or software module to indicate that this signature was created with unrelease software.
      Returns:
      true if the software module or signature handler was a pre release.
    • setPreRelease

      public void setPreRelease(boolean preRelease)
      A flag that can be used by the signature handler or software module to indicate that this signature was created with unrelease software.
      Parameters:
      preRelease - is true if the signature was created with a unrelease software, otherwise false.
    • getOS

      public String getOS()
      Indicates the operating system. The string format isn't specified yet. In its PDF Signature Build Dictionary Specifications Adobe differently specifies the value type to store operating system string:
      • Specification for PDF v1.5 specifies type as string;
      • Specification for PDF v1.7 specifies type as array and provided example for /PropBuild dictionary indicate it as array of names.
      This method supports both types to retrieve the value.
      Returns:
      the operating system id or name.
    • setOS

      public void setOS(String os)
      Indicates the operating system. The string format isn't specified yet. Value will be stored as first item of the array, as specified in PDF Signature Build Dictionary Specification for PDF v1.7.
      Parameters:
      os - is a string with the system id or name.
    • getNonEFontNoWarn

      public boolean getNonEFontNoWarn()
      If there is a LegalPDF dictionary in the catalog of the PDF file and the NonEmbeddedFonts attribute in this dictionary has a non zero value, and the viewing application has a preference set to suppress the display of this warning then the value of this attribute will be set to true.
      Returns:
      true if NonEFontNoWarn is set to true
      See Also:
    • setNonEFontNoWarn

      public void setNonEFontNoWarn(boolean noEmbedFontWarning)
      If true, the reader should not display a warning about fonts not being embedded.
      Parameters:
      noEmbedFontWarning - true if there is a Legal dictionary in the catalog and the NonEmbeddedFonts attribute has a non-zero value Documentation says: (Optional; PDF 1.5) If there is a LegalPDF dictionary in the catalog of the PDF file and the NonEmbeddedFonts attribute in this dictionary has a non zero value, and the viewing application has a preference set to suppress the display of this warning then the value of this attribute will be set to true.
      See Also:
    • getTrustedMode

      public boolean getTrustedMode()
      If true, the application was in trusted mode when signing took place.
      Returns:
      true if the application was in trusted mode while signing. default: false
    • setTrustedMode

      public void setTrustedMode(boolean trustedMode)
      If true, the application was in trusted mode when signing took place.
      Parameters:
      trustedMode - true if the application is in trusted mode.