DocumentInfo

Overview

DocumentInfo is a class in Aspose.PDF FOSS for .NET.

Represents the document information dictionary.

This class provides 9 methods for working with DocumentInfo objects in .NET programs. Available methods include: Add, Clear, ClearCustomData, ContainsKey, DocumentInfo, GetCustom, IsPredefinedKey, Remove, SetCustom. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: Author, Count, CreationDate, CreationTimeZone, Creator, IsDirty, and 8 more.

Properties

NameTypeAccessDescription
IsDirtyboolReadWhether any property has been modified since the last save/load.
CountintReadNumber of metadata entries in the underlying /Info dictionary.
KeysIEnumerable<string>ReadAll metadata entry keys.
Titlestring?Read/WriteGets or sets the title.
Authorstring?Read/WriteGets or sets the author.
Subjectstring?Read/WriteGets or sets the subject.
Keywordsstring?Read/WriteGets or sets the keywords.
Creatorstring?Read/WriteGets or sets the creator.
Producerstring?Read/WriteGets or sets the producer.
Trappedstring?Read/WriteGets or sets the trapped.
CreationDateDateTimeRead/WriteGets or sets the creation date.
ModDateDateTimeRead/WriteGets or sets the mod date.
CreationTimeZoneTimeSpanRead/WriteTimezone offset stored on the CreationDate metadata, or Zero if absent.
ModTimeZoneTimeSpanRead/WriteTimezone offset stored on the ModDate metadata, or Zero if absent.

Methods

SignatureDescription
DocumentInfo(document: Document)Creates a DocumentInfo instance for the given document.
IsPredefinedKey(key: string)Whether the given key is one of the well-known PDF document information dictionary entries defined by PDF 32000-2 ยง 14.3.3 โ€” Title, Author, Subject, Keywords, Creator, Producer, CreationDate, ModDate, Trapped.
Clear()Remove every entry from the /Info dictionary.
ClearCustomData()Remove every non-predefined (custom) entry.
Remove(key: string)Remove the entry at key.
SetCustom(key: string, value: string)Set a custom metadata property.
Add(key: string, value: string)Adds a custom metadata property.
ContainsKey(key: string)Whether the underlying /Info dictionary has an entry for the given key.
GetCustom(key: string)Get a custom metadata property.

See Also