using System;
using Aspose.Pdf;

class Program
{
    static void Main(string[] args) // Update metadata using C#
    {
        // Set the license
        new License().SetLicense("Aspose.Total.lic");

        // Open the PDF
        Document pdf = new Document("input.pdf");

        // Fetch document info
        DocumentInfo metadata = new DocumentInfo(pdf);

        metadata.Creator = "Software app";
        metadata.Producer = "Doc Producer";
        metadata.Trapped = "Alignment and Colors";
        metadata.Author = "The author";
        metadata.CreationDate = new DateTime(2023,6,1);

        // Save the output document
        pdf.Save("PDFMetadata.pdf");

        System.Console.WriteLine("Done");
    }
}