Class PdfMetaData
A class defining PDF file MetaData.
Allows File MetaData to be read and set including: Authors, File Dates, Keywords, Title and Subject
Implemented in MetaData.
Namespace: IronPdf.MetaData
Assembly: IronPdf.dll
Syntax
public class PdfMetaData : PdfClientAccessor
Properties
Author
Gets or sets the Author of the document.
Declaration
public string Author { get; set; }
Property Value
Type | Description |
---|---|
System.String | The author name as a string. |
CreationDate
Gets or sets the PDF file creation DateTime.
Declaration
public DateTime CreationDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | DateTime of PDF file creation as a Local Time. Use CreationDate.ToUniversalTime() to return a UTC DateTime |
Creator
Gets or sets the Creator of the document.
Declaration
public string Creator { get; set; }
Property Value
Type | Description |
---|---|
System.String | The creator name as a string. |
CustomProperties
Property defining custom MetaData properties of the document.
Declaration
public PdfCustomMetadataProperties CustomProperties { get; }
Property Value
Type | Description |
---|---|
PdfCustomMetadataProperties |
Keywords
Gets or sets the Keywords of the document. This helps search indexes and operating systems correctly index the PDF.
Declaration
public string Keywords { get; set; }
Property Value
Type | Description |
---|---|
System.String | The Keywords of the document as a string. It is customary to use comma separation between keywords. |
ModifiedDate
Gets or sets the PDF file last-modified DateTime.
Declaration
public DateTime ModifiedDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | DateTime of PDF file modification as a Local Time. Use ModifiedDate.ToUniversalTime() to return a UTC DateTime. |
Producer
Gets or sets the Producer of the document.
Declaration
public string Producer { get; set; }
Property Value
Type | Description |
---|---|
System.String | The producer name as a string. |
Subject
Gets or sets the Subject of the document. This helps search indexes and operating systems correctly index the PDF, and may appear in PDF viewer software.
Declaration
public string Subject { get; set; }
Property Value
Type | Description |
---|---|
System.String | The Subject of the document as a string. |
Title
Gets or sets the Title of the document. This helps search indexes and operating systems correctly index the PDF, and may appear in PDF viewer software.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | The Title of the document as a string. |
Methods
GetMetaDataDictionary()
Gets all available MetaData as a dictionary.
Declaration
public Dictionary<string, string> GetMetaDataDictionary()
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | Current MetaData dictionary |
Keys()
Gets all available MetaData keys of the document.
Declaration
public List<string> Keys()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> |
RemoveMetaDataKey(String)
Removes a MetaData key of the document.
Declaration
public void RemoveMetaDataKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
SetMetaDataDictionary(Dictionary<String, String>)
Overwrites whole MetaData from a given dictionary.
This method is the fastest and most efficient way to edit or clear PDF MetaData. Highly recommended for Docker / GRPC usage.
Declaration
public void SetMetaDataDictionary(Dictionary<string, string> newDictionary)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | newDictionary | a new MetaData dictionary |