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
| Name | Type | Access | Description |
|---|---|---|---|
IsDirty | bool | Read | Whether any property has been modified since the last save/load. |
Count | int | Read | Number of metadata entries in the underlying /Info dictionary. |
Keys | IEnumerable<string> | Read | All metadata entry keys. |
Title | string? | Read/Write | Gets or sets the title. |
Author | string? | Read/Write | Gets or sets the author. |
Subject | string? | Read/Write | Gets or sets the subject. |
Keywords | string? | Read/Write | Gets or sets the keywords. |
Creator | string? | Read/Write | Gets or sets the creator. |
Producer | string? | Read/Write | Gets or sets the producer. |
Trapped | string? | Read/Write | Gets or sets the trapped. |
CreationDate | DateTime | Read/Write | Gets or sets the creation date. |
ModDate | DateTime | Read/Write | Gets or sets the mod date. |
CreationTimeZone | TimeSpan | Read/Write | Timezone offset stored on the CreationDate metadata, or Zero if absent. |
ModTimeZone | TimeSpan | Read/Write | Timezone offset stored on the ModDate metadata, or Zero if absent. |
Methods
| Signature | Description |
|---|---|
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. |