Setting value of PdfDocumentInformation Producer

When setting the PdfDocumentInformation.Producer value of a PDF document and saving it afterwards, the value seems to be overwritten by the GemBox.Pdf component, while other custom values can be set:

My code:

private static void AddMetadata(string sourceFilename, string targetFilename)
    using var document = PdfDocument.Load(sourceFilename);

    var info = document.Info;
    info.Creator = "Custom creator value";
    info.Producer = "Custom producer value";


Is there another way to edit the Producer?

Hi Sarah,

Try using this:

document.SaveOptions.UpdateProducerInformation = false;

Does this solve your issue?


That solves it :slight_smile:

Thanks Mario!