Class MetadataSettings


  • public class MetadataSettings
    extends NativeObject
    It allows you to set and update individual metadata properties. Any metadata properties that have been explicitly set are included in the output document.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAuthor()
      The name of the person who created the document or resource.
      java.time.OffsetDateTime getCreationDate()
      The date and time the document or resource was originally created.
      java.lang.String getCreator()
      The original application that created the document.
      java.lang.String getKeywords()
      Keywords associated with the document or resource.
      java.time.OffsetDateTime getModificationDate()
      The date and time the document or resource was most recently modified.
      java.lang.String getProducer()
      The application that created the PDF (Getter)
      java.lang.String getSubject()
      The subject of the document or resource.
      java.lang.String getTitle()
      The title of the document or resource.
      void setAuthor​(java.lang.String value)
      The name of the person who created the document or resource.
      void setCreationDate​(java.time.OffsetDateTime value)
      The date and time the document or resource was originally created.
      void setCreator​(java.lang.String value)
      The original application that created the document.
      void setKeywords​(java.lang.String value)
      Keywords associated with the document or resource.
      void setModificationDate​(java.time.OffsetDateTime value)
      The date and time the document or resource was most recently modified.
      void setProducer​(java.lang.String value)
      The application that created the PDF (Setter)
      void setSubject​(java.lang.String value)
      The subject of the document or resource.
      void setTitle​(java.lang.String value)
      The title of the document or resource.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MetadataSettings

        public MetadataSettings()
    • Method Detail

      • getTitle

        public java.lang.String getTitle()

        The title of the document or resource. (Getter)

        This property corresponds to the "dc:title" entry in the XMP metadata and to the "Title" entry in the document information dictionary.
        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • setTitle

        public void setTitle​(java.lang.String value)

        The title of the document or resource. (Setter)

        This property corresponds to the "dc:title" entry in the XMP metadata and to the "Title" entry in the document information dictionary.
        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • getAuthor

        public java.lang.String getAuthor()

        The name of the person who created the document or resource. (Getter)

        This property corresponds to the "dc:creator" entry in the XMP metadata and to the "Author" entry in the document information dictionary.
        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • setAuthor

        public void setAuthor​(java.lang.String value)

        The name of the person who created the document or resource. (Setter)

        This property corresponds to the "dc:creator" entry in the XMP metadata and to the "Author" entry in the document information dictionary.
        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • getSubject

        public java.lang.String getSubject()

        The subject of the document or resource. (Getter)

        This property corresponds to the "dc:description" entry in the XMP metadata and to the "Subject" entry in the document information dictionary.
        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • setSubject

        public void setSubject​(java.lang.String value)

        The subject of the document or resource. (Setter)

        This property corresponds to the "dc:description" entry in the XMP metadata and to the "Subject" entry in the document information dictionary.
        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • getKeywords

        public java.lang.String getKeywords()

        Keywords associated with the document or resource. (Getter)

        Keywords can be separated by:

        • carriage return / line feed
        • comma
        • semicolon
        • tab
        • double space

        This property corresponds to the "pdf:Keywords" entry in the XMP metadata and to the "Keywords" entry in the document information dictionary.

        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • setKeywords

        public void setKeywords​(java.lang.String value)

        Keywords associated with the document or resource. (Setter)

        Keywords can be separated by:

        • carriage return / line feed
        • comma
        • semicolon
        • tab
        • double space

        This property corresponds to the "pdf:Keywords" entry in the XMP metadata and to the "Keywords" entry in the document information dictionary.

        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • getCreator

        public java.lang.String getCreator()

        The original application that created the document. (Getter)

        The name of the first known tool used to create the document or resource.

        This property corresponds to the "xmp:CreatorTool" entry in the XMP metadata and to the "Creator" entry in the document information dictionary.

        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • setCreator

        public void setCreator​(java.lang.String value)

        The original application that created the document. (Setter)

        The name of the first known tool used to create the document or resource.

        This property corresponds to the "xmp:CreatorTool" entry in the XMP metadata and to the "Creator" entry in the document information dictionary.

        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • getProducer

        public java.lang.String getProducer()

        The application that created the PDF (Getter)

        If the document has been converted to PDF from another format, the name of the PDF processor that converted the document to PDF.

        This property corresponds to the "pdf:Producer" entry in the XMP metadata and to the "Producer" entry in the document information dictionary.

        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • setProducer

        public void setProducer​(java.lang.String value)

        The application that created the PDF (Setter)

        If the document has been converted to PDF from another format, the name of the PDF processor that converted the document to PDF.

        This property corresponds to the "pdf:Producer" entry in the XMP metadata and to the "Producer" entry in the document information dictionary.

        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • getCreationDate

        public java.time.OffsetDateTime getCreationDate()

        The date and time the document or resource was originally created. (Getter)

        This property corresponds to the "xmp:CreateDate" entry in the XMP metadata and to the "CreationDate" entry in the document information dictionary.
        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • setCreationDate

        public void setCreationDate​(java.time.OffsetDateTime value)

        The date and time the document or resource was originally created. (Setter)

        This property corresponds to the "xmp:CreateDate" entry in the XMP metadata and to the "CreationDate" entry in the document information dictionary.
        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
        java.lang.IllegalArgumentException - The date is invalid.
      • getModificationDate

        public java.time.OffsetDateTime getModificationDate()

        The date and time the document or resource was most recently modified. (Getter)

        This property corresponds to the "xmp:ModifyDate" entry in the XMP metadata and to the "ModDate" entry in the document information dictionary.
        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
      • setModificationDate

        public void setModificationDate​(java.time.OffsetDateTime value)

        The date and time the document or resource was most recently modified. (Setter)

        This property corresponds to the "xmp:ModifyDate" entry in the XMP metadata and to the "ModDate" entry in the document information dictionary.
        Throws:
        java.lang.IllegalStateException - If the metadata settings have already been closed
        java.lang.IllegalArgumentException - The date is invalid.