Contains data returned by FileFormatUtil document format detection methods.
You do not create instances of this class directly. Objects of this class are returned by DetectFileFormat() methods.
Shows how to use the FileFormatUtil class to detect the document format and encryption.
Shows how to use the FileFormatUtil class to detect the document format and presence of digital signatures.
#include <Aspose.Words.Cpp/FileFormatInfo.h>
Public Member Functions | |
SharedPtr< Encoding > | get_Encoding () const |
Gets the detected encoding if applicable to the current document format. At the moment detects encoding only for HTML documents. More... | |
bool | get_HasDigitalSignature () const |
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. More... | |
bool | get_IsEncrypted () const |
Returns true if the document is encrypted and requires a password to open. More... | |
LoadFormat | get_LoadFormat () const |
Gets the detected document format. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
Static Public Member Functions | |
static const TypeInfo & | Type () |
System::SharedPtr<System::Text::Encoding> Aspose::Words::FileFormatInfo::get_Encoding | ( | ) | const |
Gets the detected encoding if applicable to the current document format. At the moment detects encoding only for HTML documents.
Shows how to detect encoding in an html file.
bool Aspose::Words::FileFormatInfo::get_HasDigitalSignature | ( | ) | const |
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.
This property exists to help you sort documents that are digitally signed from those that are not. If you use Aspose.Words to modify and save a document that is digitally signed, then the digital signature will be lost. This is by design because a digital signature exists to guard the authenticity of a document. Using this property you can detect digitally signed documents before processing them in the same way as normal documents and take some action to avoid losing the digital signature, for example notify the user.
Shows how to use the FileFormatUtil class to detect the document format and presence of digital signatures.
bool Aspose::Words::FileFormatInfo::get_IsEncrypted | ( | ) | const |
Returns true if the document is encrypted and requires a password to open.
This property exists to help you sort documents that are encrypted from those that are not. If you attempt to load an encrypted document using Aspose.Words without supplying a password an exception will be thrown. You can use this property to detect whether a document requires a password and take some action before loading a document, for example, prompt the user for a password.
Shows how to use the FileFormatUtil class to detect the document format and encryption.
Aspose::Words::LoadFormat Aspose::Words::FileFormatInfo::get_LoadFormat | ( | ) | const |
Gets the detected document format.
When an OOXML document is encrypted, it is not possible to ascertained whether it is an Excel, Word or PowerPoint document without decrypting it first so for an encrypted OOXML document this property will always return Docx.
Shows how to use the FileFormatUtil class to detect the document format and encryption.
Shows how to use the FileFormatUtil class to detect the document format and presence of digital signatures.
Shows how to use the FileFormatUtil methods to detect the format of a document.
|
overridevirtual |
Reimplemented from System::Object.
|
overridevirtual |
Reimplemented from System::Object.
|
static |