Using the GroupDocs.Metadata for .NET you can easily search metadata and extract desired metadata properties from PDF, DOCX, PPTX, XLSX, images, audio, video and many other files of different types in your .NET solution.
GroupDocs.Metadata for .NET supports many file formats. See full list at supported file formats article.
Use tags to find most common metadata properties
To make manipulating metadata in your code easier we attach specific tags to the most commonly used metadata properties extracted from a file. Some metadata standards can have quite a complex structure. Moreover, in most cases, an image, video or document contains more than one metadata packages. Using tags you can search for desirable properties with a few lines of code without even knowing the exact format of the loaded file.
In this article we will demonstrate how to search and extract metadata from PPTX Microsoft PowerPoint presentation. Using the same code, you can easily search matadata properties of any supported file formats.
The following steps and C# code sample below show how to search for specific metadata properties using tags in .NET solution:
// Constants.InputPptx is an absolute or relative path to your document. Ex: @"C:\Docs\source.pptx"using(Metadatametadata=newMetadata(Constants.InputPptx)){// Fetch all the properties satisfying the predicate:// property contains the name of the last document editor OR the date/time the document was last modifiedvarproperties=metadata.FindProperties(p=>p.Tags.Contains(Tags.Person.Editor)||p.Tags.Contains(Tags.Time.Modified));foreach(varpropertyinproperties){Console.WriteLine("Property name: {0}, Property value: {1}",property.Name,property.Value);}}
As a result, we obtain all metadata properties containing the name of the person last edited the document and all properties that store the date/time the document was last edited.
For more information on supported features of the GroupDocs.Metadata search engine please refer to the following articles:
Along with full featured .NET library we provide simple, but powerful free Apps.
You are welcome to view and edit metadata of PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX, emails, images and more with our free online Free Online Document Metadata Viewing and Editing App.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.