DocumentSummaryInformation Class
Definition
Provides a strongly-typed view over the document-summary-information property set (\x05DocumentSummaryInformation)
of a compound file, including any user-defined custom properties.
public sealed class DocumentSummaryInformation
- Inheritance
-
DocumentSummaryInformation
- Inherited Members
- Extension Methods
Remarks
The document-summary-information set carries extended document metadata such as the category, company, and slide count, and may include a second, user-defined section whose properties are named by a dictionary. Each property is optional; a property that is absent or of an unexpected type is surfaced as null.
using Bodu.IO.Compound;
using Bodu.IO.Compound.PropertySets;
using CompoundFile file = CompoundFile.OpenRead("report.doc");
if (file.TryGetDocumentSummaryInformation(out DocumentSummaryInformation? info))
{
Console.WriteLine($"Company: {info.Company}");
Console.WriteLine($"Category: {info.Category}");
foreach (KeyValuePair<string, OlePropertyValue> custom in info.CustomProperties)
Console.WriteLine($"{custom.Key} = {custom.Value.Value}");
}
Constructors
DocumentSummaryInformation(OlePropertySet)
Initializes a new instance of the DocumentSummaryInformation class over a parsed property set.
public DocumentSummaryInformation(OlePropertySet propertySet)
Parameters
propertySetOlePropertySetThe parsed document-summary-information property set.
Exceptions
- ArgumentNullException
Thrown when
propertySetis null.
Fields
StreamName
The directory name of the document-summary-information stream, including its leading control prefix.
public const string StreamName = "\u0005DocumentSummaryInformation"
Field Value
Properties
Bytes
Gets the document size in bytes.
public int? Bytes { get; }
Property Value
Category
Gets the document category.
public string? Category { get; }
Property Value
Company
Gets the document company.
public string? Company { get; }
Property Value
CustomProperties
Gets the user-defined custom properties, keyed by their human-readable names.
public IReadOnlyDictionary<string, OlePropertyValue> CustomProperties { get; }
Property Value
- IReadOnlyDictionary<string, OlePropertyValue>
A dictionary of custom property name to value drawn from the user-defined section; empty when the property set has no user-defined section.
HiddenCount
Gets the hidden-slide count.
public int? HiddenCount { get; }
Property Value
LineCount
Gets the line count.
public int? LineCount { get; }
Property Value
LinksUpToDate
Gets a value indicating whether the document's links are up to date.
public bool? LinksUpToDate { get; }
Property Value
Manager
Gets the document manager.
public string? Manager { get; }
Property Value
MultimediaClipCount
Gets the multimedia-clip count.
public int? MultimediaClipCount { get; }
Property Value
NoteCount
Gets the note count.
public int? NoteCount { get; }
Property Value
ParagraphCount
Gets the paragraph count.
public int? ParagraphCount { get; }
Property Value
PresentationTarget
Gets the presentation target format.
public string? PresentationTarget { get; }
Property Value
PropertySet
Gets the underlying parsed property set.
public OlePropertySet PropertySet { get; }
Property Value
- OlePropertySet
The document-summary-information OlePropertySet.
ScaleCrop
Gets a value indicating whether the document is scaled to crop.
public bool? ScaleCrop { get; }
Property Value
SlideCount
Gets the slide count.
public int? SlideCount { get; }
Property Value
Methods
Read(Stream)
Reads and parses a document-summary-information property set from a stream, consuming it to the end.
public static DocumentSummaryInformation Read(Stream stream)
Parameters
streamStreamThe stream containing the document-summary-information property-set bytes.
Returns
- DocumentSummaryInformation
A DocumentSummaryInformation view over the parsed property set.
Exceptions
- ArgumentNullException
Thrown when
streamis null.- CompoundFileFormatException
Thrown when the data is not a well-formed property set.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |