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

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

Parameters

stream
Type: System.IOStream
The file stream.
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