FileFormatInfo Class
Contains data returned by FileFormatUtil document format detection methods.
Inheritance Hierarchy

Namespace: Aspose.Words
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.11
public class FileFormatInfo

The FileFormatInfo type exposes the following members.

Public propertyCode exampleEncoding
Gets the detected encoding if applicable to the current document format. At the moment detects encoding only for HTML documents.
Public propertyCode exampleHasDigitalSignature
Returns true if this document contains a digital signature. This property merely informs that a digital signature is present on a document, but it does not specify whether the signature is valid or not.
Public propertyCode exampleIsEncrypted
Returns true if the document is encrypted and requires a password to open.
Public propertyCode exampleLoadFormat
Gets the detected document format.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)

You do not create instances of this class directly. Objects of this class are returned by DetectFileFormat(Stream) methods.

Shows how to use the FileFormatUtil class to detect the document format and other features of the document.
FileFormatInfo info = FileFormatUtil.DetectFileFormat(MyDir + "Document.doc");
Console.WriteLine("The document format is: " + FileFormatUtil.LoadFormatToExtension(info.LoadFormat));
Console.WriteLine("Document is encrypted: " + info.IsEncrypted);
Console.WriteLine("Document has a digital signature: " + info.HasDigitalSignature);
See Also