usmanazizgroupdocs
12/8/2015 - 8:32 AM

RemoveCustomDocumentPropertiesPdfFormat.vb

' 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"

' check if property is not built-in
If Not metadata.IsBuiltIn(propertyName) Then
    ' remove property
    metadata.Remove(propertyName)
Else
    Console.WriteLine("Can not remove built-in property.")
End If

' save file in destination folder
pdfFormat.Save(Common.MapDestinationFilePath(filePath))