// For complete examples and data files, please go to https://github.com/groupdocs-metadata/GroupDocs.Metadata-for-.NET
// path to the Word document protected by password
string path = @"C:\\protected.docx";
try
{
// initialize DocFormat
DocFormat pdfFormat = new DocFormat(path);
// and try to get document properties
var documentProperties = pdfFormat.DocumentProperties;
}
catch (DocumentProtectedException ex)
{
Console.WriteLine("File is protected by password PDF: {0}", ex.Message);
}