---
title: "Edit PDF metadata in C# | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/csharp/editor/editing-pdf-metadata/"
md_url: "https://www.nutrient.io/guides/dotnet/csharp/editor/editing-pdf-metadata.md"
last_updated: "2026-10-08T00:00:00.000Z"
description: "How to edit PDF metadata using Nutrient .NET SDK."
---

# Editing PDF metadata with Nutrient .NET SDK

PDF metadata carries a document's identity — its title, author, and other descriptive fields that search engines, document management systems, and PDF viewers read. Editing metadata programmatically keeps large document libraries consistent without manual work in a PDF editor.

Use programmatic metadata editing to:

- Normalize author and title fields across a document library.

- Stamp generated documents with product or organization identity.

- Correct metadata before archiving or distribution.

## Edit PDF metadata with the.NET SDK

You can read and write PDF metadata in a.NET application with the Nutrient.NET SDK. The SDK edits the document in place and saves a new file, so the original stays untouched.

## Prepare the project

Start by importing the Nutrient namespace:

```csharp

using Nutrient;

```

## Load the PDF document and create an editor

Open the source document, then create a `PdfEditor` for it. The editor exposes the document's metadata object:

```csharp

try
{
    using Document document = Document.Open("input.pdf");
    using PdfEditor editor = PdfEditor.Edit(document);

```

## Update the metadata fields

Fetch the metadata object and set the fields you want to change:

```csharp

    var metadata = editor.Metadata;
    metadata.Author = "New author value";
    metadata.Title = "New title value";

```

The metadata object also exposes subject, keywords, creator, and producer through the corresponding properties.

## Save the edited document

Write the result to a new file:

```csharp

    editor.SaveAs("output.pdf");
    Console.WriteLine("Successfully edited metadata");
}
catch (NutrientException e)
{
    Console.Error.WriteLine($"Error: {e.Message}");
    Environment.Exit(1);
}

```

## Handle errors

Nutrient.NET SDK uses exception handling for errors. The methods in this guide throw a `NutrientException` if a failure occurs. The `using` statements release the editor and document handles even when a step fails.

## Conclusion

You've edited PDF metadata and saved the result as a new document. The same editor object supports page manipulation and other document editing operations.

---

## Related pages

- [Nutrient .NET SDK editor guides](/guides/dotnet/csharp/editor.md)
- [Adding annotations to a PDF document](/guides/dotnet/csharp/editor/add-annotations-to-pdf.md)
- [Adding a custom page to a PDF document](/guides/dotnet/csharp/editor/add-custom-page-to-pdf.md)
- [Adding interactive form fields to a PDF document](/guides/dotnet/csharp/editor/add-form-fields-to-pdf.md)
- [Adding free text annotations to a PDF document](/guides/dotnet/csharp/editor/add-freetext-annotations-to-pdf.md)
- [Adding invisible digital signatures to a PDF document](/guides/dotnet/csharp/editor/add-invisible-signature-to-pdf.md)
- [Adding link annotations to a PDF document](/guides/dotnet/csharp/editor/add-link-annotations-to-pdf.md)
- [Adding redaction annotations to a PDF document](/guides/dotnet/csharp/editor/add-redaction-annotations-to-pdf.md)
- [Adding shape annotations to a PDF document](/guides/dotnet/csharp/editor/add-shape-annotations-to-pdf.md)
- [Adding stamp annotations to a PDF document](/guides/dotnet/csharp/editor/add-stamp-annotations-to-pdf.md)
- [Adding sticky note annotations to a PDF document](/guides/dotnet/csharp/editor/add-sticky-note-annotations-to-pdf.md)
- [Adding text markup annotations to a PDF document](/guides/dotnet/csharp/editor/add-text-markup-annotations-to-pdf.md)
- [Adding visible digital signatures to a PDF document](/guides/dotnet/csharp/editor/add-visible-signature-to-pdf.md)
- [Advanced digital signature workflows](/guides/dotnet/csharp/editor/advanced-digital-signatures.md)
- [Detecting and adding form fields to a PDF document](/guides/dotnet/csharp/editor/detect-and-add-form-fields.md)
- [Editing PDF form fields](/guides/dotnet/csharp/editor/editing-pdf-form-fields.md)
- [Filling PDF form fields](/guides/dotnet/csharp/editor/fill-pdf-form.md)
- [Managing PDF page order](/guides/dotnet/csharp/editor/manage-pdf-page-order.md)
- [Merging PDFs](/guides/dotnet/csharp/editor/merge-pdf-into-other-pdf.md)

