IptcRecordSetSet Method
Adds or updates the specified dataSet in the appropriate record.

Namespace: GroupDocs.Metadata.Standards.Iptc
Assembly: GroupDocs.Metadata (in GroupDocs.Metadata.dll) Version: 21.8
Syntax
public void Set(
	IptcDataSet dataSet
)

Parameters

dataSet
Type: GroupDocs.Metadata.Standards.IptcIptcDataSet
The IPTC dataSet to add/update.
Examples
This example shows how to add or update custom IPTC datasets in a file.
C#
using (Metadata metadata = new Metadata(Constants.PsdWithIptc))
{
    IIptc root = metadata.GetRootPackage() as IIptc;
    if (root != null)
    {
        // Set the IPTC package if it's missing
        if (root.IptcPackage == null)
        {
            root.IptcPackage = new IptcRecordSet();
        }

        // Add a know property using the DataSet API
        root.IptcPackage.Set(new IptcDataSet((byte) IptcRecordType.ApplicationRecord, (byte) IptcApplicationRecordDataSet.BylineTitle, "test code sample"));

        // Add a custom IPTC DataSet
        root.IptcPackage.Set(new IptcDataSet(255, 255, new byte[] { 1, 2, 3 }));

        metadata.Save(Constants.OutputPsd);
    }
}
See Also