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.9
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
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(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