Class MetadataManager
- java.lang.Object
-
- com.ironsoftware.ironpdf.metadata.MetadataManager
-
public class MetadataManager extends Object
Class used to read and edit MetaData in aPdfDocument
.
-
-
Constructor Summary
Constructors Constructor Description MetadataManager(com.ironsoftware.ironpdf.internal.staticapi.InternalPdfDocument internalPdfDocument)
Please get MetadataManager byPdfDocument.getMetadata()
instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getAnyMetadata(String key)
Gets any metadata value of the document form given key.String
getAuthor()
Gets the Author of the document.OffsetDateTime
getCreationDate()
Gets the PDF file creation DateTime.String
getCreator()
Gets the Creator of the document.String
getKeywords()
Gets Keywords of the document.OffsetDateTime
getModifiedDate()
Gets the PDF file last-modified DateTime.String
getProducer()
Gets the Producer of the document.String
getSubject()
Gets Subject of the document.String
getTitle()
Gets the Title of the document.void
removeMetadata(String key)
Method for removing Metadata property by its name.void
setAnyMetadata(String key, String value)
Sets any metadata value of the document form given key.void
setAuthor(String value)
Sets the Author of the document.void
setCreationDate(String value)
Deprecated.As of version 2025.7.17, replaced by#setCreationDate()
.void
setCreationDate(OffsetDateTime value)
Sets the PDF file creation DateTime.void
setCreator(String value)
Sets the Creator of the document.void
setKeywords(String value)
Sets Keywords of the document.void
setModifiedDate(String value)
Deprecated.As of version 2025.7.17, replaced by#setModifiedDate()
.void
setModifiedDate(OffsetDateTime value)
Sets the PDF file last-modified DateTime.void
setProducer(String value)
Sets the Producer of the document.void
setSubject(String value)
Sets the Subject of the document.void
setTitle(String value)
Sets the Title of the document.
-
-
-
Constructor Detail
-
MetadataManager
public MetadataManager(com.ironsoftware.ironpdf.internal.staticapi.InternalPdfDocument internalPdfDocument)
Please get MetadataManager byPdfDocument.getMetadata()
instead.- Parameters:
internalPdfDocument
- the internal pdf document
-
-
Method Detail
-
getAuthor
public String getAuthor()
Gets the Author of the document.- Returns:
- the author
-
getAnyMetadata
public String getAnyMetadata(String key)
Gets any metadata value of the document form given key.- Parameters:
key
- the key- Returns:
- the metadata value
-
setAuthor
public void setAuthor(String value)
Sets the Author of the document.- Parameters:
value
- the value
-
setAnyMetadata
public void setAnyMetadata(String key, String value)
Sets any metadata value of the document form given key.- Parameters:
key
- the keyvalue
- the value
-
getCreationDate
public OffsetDateTime getCreationDate()
Gets the PDF file creation DateTime.- Returns:
- the creation date as OffsetDateTime object.
-
setCreationDate
@Deprecated public void setCreationDate(String value)
Deprecated.As of version 2025.7.17, replaced by#setCreationDate()
. This method will be removed in a future release. Please use the new method to provide an OffsetDateTime object instead of a String.
-
setCreationDate
public void setCreationDate(OffsetDateTime value)
Sets the PDF file creation DateTime.- Parameters:
value
- the DateTime value.
-
getModifiedDate
public OffsetDateTime getModifiedDate()
Gets the PDF file last-modified DateTime.- Returns:
- the modified date as OffsetDateTime object.
-
setModifiedDate
@Deprecated public void setModifiedDate(String value)
Deprecated.As of version 2025.7.17, replaced by#setModifiedDate()
. This method will be removed in a future release. Please use the new method to provide an OffsetDateTime object instead of a String.
-
setModifiedDate
public void setModifiedDate(OffsetDateTime value)
Sets the PDF file last-modified DateTime.- Parameters:
value
- the DateTime value.
-
getCreator
public String getCreator()
Gets the Creator of the document.- Returns:
- the creator
-
setCreator
public void setCreator(String value)
Sets the Creator of the document.- Parameters:
value
- the value
-
getKeywords
public String getKeywords()
Gets Keywords of the document. This helps search indexes and operating systems correctly index the PDF.- Returns:
- the keywords
-
setKeywords
public void setKeywords(String value)
Sets Keywords of the document. This helps search indexes and operating systems correctly index the PDF.- Parameters:
value
- the value
-
getProducer
public String getProducer()
Gets the Producer of the document.- Returns:
- the producer
-
setProducer
public void setProducer(String value)
Sets the Producer of the document.- Parameters:
value
- the value
-
getSubject
public String getSubject()
Gets Subject of the document. This helps search indexes and operating systems correctly index the PDF, and may appear in PDF viewer software.- Returns:
- the subject
-
setSubject
public void setSubject(String value)
Sets the Subject of the document. This helps search indexes and operating systems correctly index the PDF, and may appear in PDF viewer software.- Parameters:
value
- the value
-
getTitle
public String getTitle()
Gets the Title of the document. This helps search indexes and operating systems correctly index the PDF, and may appear in PDF viewer software.- Returns:
- the title
-
setTitle
public void setTitle(String value)
Sets the Title of the document. This helps search indexes and operating systems correctly index the PDF, and may appear in PDF viewer software.- Parameters:
value
- the value
-
removeMetadata
public void removeMetadata(String key)
Method for removing Metadata property by its name.- Parameters:
key
- The name of the property.
-
-