ParserGetFileInfo Method (Stream)
Returns the general information about a file.

Namespace: GroupDocs.Parser
Assembly: GroupDocs.Parser (in GroupDocs.Parser.dll) Version: 21.5.0
Syntax
public static FileInfo GetFileInfo(
	Stream document
)

Parameters

document
Type: System.IOStream
The source input stream.

Return Value

Type: FileInfo
An instance of FileInfo class.
Examples

The following code shows how to check whether a file is password-protected:

C#
// Get a file info
Options.FileInfo info = Parser.GetFileInfo(document);
// Check IsEncrypted property
Console.WriteLine(info.IsEncrypted ? "Password is required" : "");
See Also