' For complete examples and data files, please go to https://github.com/groupdocsmetadata/GroupDocs_Metadata_NET
' initialize PdfFormat
Dim pdfFormat As New PdfFormat(Common.MapSourceFilePath(filePath))
' initialize PdfMetadata
Dim metadata As PdfMetadata = pdfFormat.DocumentProperties
Dim propertyName As String = "New Custom Property"
Dim propertyValue As String = "123"
' check if property already exists
If Not metadata.ContainsKey(propertyName) Then
' add property
metadata.Add(propertyName, propertyValue)
End If
' save file in destination folder
pdfFormat.Save(Common.MapDestinationFilePath(filePath))