Class Metadata


public class Metadata extends NativeObject

Represents the metadata of a document or an object in a document.

For document level metadata, all changes are reflected in both, XMP metadata and document info dictionary depending on the conformance of the document.

  • Method Details

    • getTitle

      public 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:
      IllegalStateException - if the metadata have already been closed
    • getAuthor

      public 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:
      IllegalStateException - if the metadata have already been closed
    • getSubject

      public 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:
      IllegalStateException - if the metadata have already been closed
    • getKeywords

      public 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:
      IllegalStateException - if the metadata have already been closed
    • getCreator

      public 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:
      IllegalStateException - if the metadata have already been closed
    • getProducer

      public String getProducer()

      The application that created the PDF (Getter)

      If the document was converted to PDF from another format, the name of the PDF processor that converted it 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:
      IllegalStateException - if the metadata have already been closed
    • getCreationDate

      public 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:
      IllegalStateException - if the metadata have already been closed
    • getModificationDate

      public OffsetDateTime getModificationDate() throws CorruptException

      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:
      CorruptException - The date is corrupt.
      IllegalStateException - if the metadata have already been closed