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

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

The FileFormatInfo type exposes the following members.

Properties
  NameDescription
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.
Methods
  NameDescription
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.)
Remarks

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

Examples
Shows how to use the FileFormatUtil class to detect the document format and other features of the document.
[C#]

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