FileTypeFromStream Method (Stream, String, ILogger)
Detects file type by reading the file signature.

Namespace: GroupDocs.Viewer
Assembly: GroupDocs.Viewer (in GroupDocs.Viewer.dll) Version: 21.2
Syntax
public static FileType FromStream(
	Stream stream,
	string password,
	ILogger logger
)

Parameters

stream
Type: System.IOStream
The file stream.
password
Type: SystemString
The password to open the file.
logger
Type: GroupDocs.Viewer.LoggingILogger
The logger.

Return Value

Type: FileType
Returns file type in case it was detected successfully otherwise returns default Unknown file type.
See Also