GroupDocs.Metadata
Read, edit, and remove metadata in documents, images, audio, and video — with a single, consistent API across .NET, Java, Node.js, and Python.
Choose your platform selecting one updates the snippets below
Node.js
v26.2.0
Getting started with .NET
using System;
using GroupDocs.Metadata;
using (Metadata metadata = new Metadata("input.pdf"))
{
// Remove all detected metadata packages
int affected = metadata.Sanitize();
Console.WriteLine("Properties removed: {0}", affected);
metadata.Save("output.pdf");
}
import com.groupdocs.metadata.*;
try (Metadata metadata = new Metadata("input.pdf")) {
// Remove all detected metadata packages
int affected = metadata.sanitize();
System.out.println("Properties removed: " + affected);
metadata.save("output.pdf");
}
const groupdocs = require('@groupdocs/groupdocs.metadata');
// Load the document
const metadata = new groupdocs.Metadata("input.pdf");
// Remove all detected metadata packages
const affected = metadata.sanitize();
console.log("Properties removed: " + affected);
// Save the cleaned document
metadata.save("output.pdf");
metadata.close();
from groupdocs.metadata import Metadata
def read_document_info():
# Provide Spreadsheet path to Metadata
with Metadata("./input.xlsx") as metadata:
# Process metadata from the document
info = metadata.get_document_info()
print(f"File format: {info.file_type.file_format}")
print(f"File extension: {info.file_type.extension}")
print(f"MIME Type: {info.file_type.mime_type}")
print(f"Number of pages: {info.page_count}")
print(f"Document size: {info.size} bytes")
print(f"Is document encrypted: {info.is_encrypted}")
if __name__ == "__main__":
read_document_info()
Popular classes & namespaces
Class
Metadata
GroupDocs.Metadata
Method
Metadata.GetRootPackage
GroupDocs.Metadata
Class
RootMetadataPackage
Metadata.Common
Class
MetadataPackage
Metadata.Common
Class
MetadataProperty
Metadata.Common
Class
PropertyValue
Metadata.Common
Class
FileType
Metadata.Common
Enum
MetadataType
Metadata.Common
Key capabilities
- Read, edit & remove metadata
- EXIF, XMP & IPTC support
- Built-in & custom properties
- Search & clean metadata
- Inspect file structure
- Documents, images, audio & video
Supported formats
DocumentsImagesAudioVideoPDF
…and 60+ more across documents, images, audio, and video.
Resources
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.