ZingPDF logo

Guide

How to update PDF metadata in C#

Call GetMetadataAsync(), update the fields you care about, and save the document.

The editable fields are Title, Author, Subject, Keywords, Creator, and CreationDate. ZingPDF stamps Producer and refreshes ModifiedDate during save.

The shortest working example

Load the metadata wrapper, set the values you want, then save.

using ZingPDF;

using var pdf = Pdf.Load(File.OpenRead("input.pdf"));
using var output = File.Create("metadata-updated.pdf");

var metadata = await pdf.GetMetadataAsync();
metadata.Title = "Quarterly Report";
metadata.Author = "Taylor Smith";
metadata.Subject = "Financial summary";
metadata.Keywords = "finance,quarterly";
metadata.Creator = "Back Office Importer";
metadata.CreationDate = new DateTimeOffset(2026, 3, 1, 9, 0, 0, TimeSpan.Zero);

await pdf.SaveAsync(output);

Editable fields

The high-level metadata wrapper gives you direct access to the common document info values.

  • Title
  • Author
  • Subject
  • Keywords
  • Creator
  • CreationDate

If the file does not already have an info dictionary, ZingPDF creates one during save.

Fields managed during save

Producer is stamped to ZingPDF and ModifiedDate is refreshed when you save the document.

That means you should treat those values as save-managed output rather than values you set manually through the high-level wrapper.

Need the document text too?

Metadata updates and text extraction often sit in the same ingestion path.

Read How to extract text from a PDF in C#.

Open metadata docs View pricing