Read and edit metadata with GroupDocs.Metadata
Leave feedback
On this page
GroupDocs.Metadata reads and edits the metadata inside a document — authors, timestamps, EXIF and XMP tags, ID3 audio tags — without touching its visible content. Stripping metadata before a document leaves your organisation is the most common reason to reach for it.
Read document information
GetDocumentInfo gives you the basics without loading the whole metadata tree.
Properties are searched with a predicate rather than by name, because the same idea is spelled differently in every format. Tags describe what a property means, so Tags.Person.Creator finds the author whether the file calls it Author, Creator or dc:creator.
usingSystem;usingGroupDocs.Metadata;usingGroupDocs.Metadata.Common;usingGroupDocs.Metadata.Tagging;using(Metadatametadata=newMetadata("contract.docx")){// Every property tagged as identifying a personIEnumerable<MetadataProperty>properties=metadata.FindProperties(p=>p.Tags.Contains(Tags.Person.Creator));foreach(MetadataPropertypropertyinproperties){Console.WriteLine(property.Name+" = "+property.Value);}}
contract.docx is the sample file used in this example. Click here to download it.
Author = Dana Whitfield
dc:creator = Dana Whitfield
GroupDocs.Metadata also adds and updates properties, removes only the properties matching a predicate, and works with format-specific standards — EXIF, XMP and IPTC in images, ID3 and APE in audio, and the built-in and custom property sets of Office documents.