string dataDir = RunExamples.GetDataDir_LoadingAndSaving(); string fileName = Path.Combine(dataDir, "Aspose.one"); Document document; if (!Document.IsEncrypted(fileName, out document)) { Console.WriteLine("The document is loaded and ready to be processed."); } else { Console.WriteLine("The document is encrypted. Provide a password."); }