Class DocumentInfo

java.lang.Object
org.jpedal.constants.DocumentInfo

public final class DocumentInfo extends Object
Represents the document info dictionary from a PDF.

Can also be transformed into an XMP packet for embedded as a document metadata stream.

  • Constructor Details

    • DocumentInfo

      public DocumentInfo()
  • Method Details

    • getTitle

      public String getTitle()
      Gets the document’s title.
      Returns:
      the title of the document, or null if not set
    • setTitle

      public DocumentInfo setTitle(String title)
      Sets the document’s title.
      Parameters:
      title - the document’s title
    • getAuthor

      public String getAuthor()
      Gets the author of the document.
      Returns:
      the author, or null if not set
    • setAuthor

      public DocumentInfo setAuthor(String author)
      Sets the author of the document.
      Parameters:
      author - the author’s name
    • getSubject

      public String getSubject()
      Gets the subject of the document.
      Returns:
      the subject, or null if not set
    • setSubject

      public DocumentInfo setSubject(String subject)
      Sets the subject of the document.
      Parameters:
      subject - the subject
    • getKeywords

      public String getKeywords()
      Gets the keywords associated with the document.
      Returns:
      the keywords, or null if not set
    • setKeywords

      public DocumentInfo setKeywords(String keywords)
      Sets the keywords associated with the document.
      Parameters:
      keywords - the keywords
    • getCreator

      public String getCreator()
      Gets the creator of the document.
      Returns:
      the creator, or null if not set
    • setCreator

      public DocumentInfo setCreator(String creator)
      Sets the creator of the document.
      Parameters:
      creator - the creator application/tool name
    • getProducer

      public String getProducer()
      Gets the producer of the document.
      Returns:
      the producer, or null if not set
    • setProducer

      public DocumentInfo setProducer(String producer)
      Sets the producer of the document.
      Parameters:
      producer - the producer tool name
    • getCreationDate

      public Instant getCreationDate()
      Gets the creation date of the document.
      Returns:
      the creation date, or null if not set
    • setCreationDate

      public DocumentInfo setCreationDate(Instant creationDate)
      Sets the creation date of the document.
      Parameters:
      creationDate - the document’s creation date and time
    • getModDate

      public Instant getModDate()
      Gets the last modification date of the document.
      Returns:
      the modification date, or null if not set
    • setModDate

      public DocumentInfo setModDate(Instant modDate)
      Sets the last modification date of the document.
      Parameters:
      modDate - the document’s modification date and time
    • getTrapped

      public DocumentInfo.TrappedStatus getTrapped()
      Gets the trapped status of the document.
      Returns:
      the trapped status, or null if not set
    • setTrapped

      public DocumentInfo setTrapped(DocumentInfo.TrappedStatus trapped)
      Sets the trapped status of the document.
      Parameters:
      trapped - the trapped status
    • toXMP

      public Document toXMP() throws IOException
      Convert this DocumentInfo object into an XMP packet which can be embedded as a document metadata stream.
      Returns:
      an XML object of the XMP packet
      Throws:
      IOException - if the XML cannot be generated