Allows to extract plain-text representation of the document's content.
Shows how to load the contents of a Microsoft Word document in plaintext.
#include <Aspose.Words.Cpp/PlainTextDocument.h>
Public Member Functions | |
PlainTextDocument (SharedPtr< Stream > stream) | |
Creates a plain text document from a stream. Automatically detects the file format. More... | |
PlainTextDocument (SharedPtr< Stream > stream, SharedPtr< LoadOptions > loadOptions) | |
Creates a plain text document from a stream. Allows to specify additional options such as an encryption password. More... | |
PlainTextDocument (String fileName) | |
Creates a plain text document from a file. Automatically detects the file format. More... | |
PlainTextDocument (String fileName, SharedPtr< LoadOptions > loadOptions) | |
Creates a plain text document from a file. Allows to specify additional options such as an encryption password. More... | |
SharedPtr< BuiltInDocumentProperties > | get_BuiltInDocumentProperties () const |
Gets BuiltInDocumentProperties of the document. More... | |
SharedPtr< CustomDocumentProperties > | get_CustomDocumentProperties () const |
Gets CustomDocumentProperties of the document. More... | |
String | get_Text () const |
Gets textual content of the document concatenated as a string. More... | |
virtual const TypeInfo & | GetType () const override |
virtual bool | Is (const TypeInfo &target) const override |
Static Public Member Functions | |
static const TypeInfo & | Type () |
Aspose::Words::PlainTextDocument::PlainTextDocument | ( | System::String | fileName | ) |
Creates a plain text document from a file. Automatically detects the file format.
fileName | Name of the file to extract the text from. |
Aspose::Words::UnsupportedFileFormatException | The document format is not recognized or not supported. |
Aspose::Words::FileCorruptedException | The document appears to be corrupted and cannot be loaded. |
System::Exception | There is a problem with the document and it should be reported to Aspose.Words developers. |
System::IO::IOException | There is an input/output exception. |
Aspose::Words::IncorrectPasswordException | The document is encrypted and requires a password to open, but you supplied an incorrect password. |
System::ArgumentException | The name of the file cannot be null or empty string. |
Shows how to load the contents of a Microsoft Word document in plaintext.
Aspose::Words::PlainTextDocument::PlainTextDocument | ( | System::String | fileName, |
System::SharedPtr< Aspose::Words::Loading::LoadOptions > | loadOptions | ||
) |
Creates a plain text document from a file. Allows to specify additional options such as an encryption password.
fileName | Name of the file to extract the text from. |
loadOptions | Additional options to use when loading a document. Can be null. |
Aspose::Words::UnsupportedFileFormatException | The document format is not recognized or not supported. |
Aspose::Words::FileCorruptedException | The document appears to be corrupted and cannot be loaded. |
System::Exception | There is a problem with the document and it should be reported to Aspose.Words developers. |
System::IO::IOException | There is an input/output exception. |
Aspose::Words::IncorrectPasswordException | The document is encrypted and requires a password to open, but you supplied an incorrect password. |
System::ArgumentException | The name of the file cannot be null or empty string. |
Shows how to load the contents of an encrypted Microsoft Word document in plaintext.
Aspose::Words::PlainTextDocument::PlainTextDocument | ( | System::SharedPtr< System::IO::Stream > | stream | ) |
Creates a plain text document from a stream. Automatically detects the file format.
The document must be stored at the beginning of the stream. The stream must support random positioning.
stream | The stream where to extract the text from. |
Aspose::Words::UnsupportedFileFormatException | The document format is not recognized or not supported. |
Aspose::Words::FileCorruptedException | The document appears to be corrupted and cannot be loaded. |
System::Exception | There is a problem with the document and it should be reported to Aspose.Words developers. |
System::IO::IOException | There is an input/output exception. |
Aspose::Words::IncorrectPasswordException | The document is encrypted and requires a password to open, but you supplied an incorrect password. |
System::ArgumentNullException | The stream cannot be null. |
System::NotSupportedException | The stream does not support reading or seeking. |
System::ObjectDisposedException | The stream is a disposed object. |
Shows how to load the contents of a Microsoft Word document in plaintext using stream.
Aspose::Words::PlainTextDocument::PlainTextDocument | ( | System::SharedPtr< System::IO::Stream > | stream, |
System::SharedPtr< Aspose::Words::Loading::LoadOptions > | loadOptions | ||
) |
Creates a plain text document from a stream. Allows to specify additional options such as an encryption password.
The document must be stored at the beginning of the stream. The stream must support random positioning.
stream | The stream where to extract the text from. |
loadOptions | Additional options to use when loading a document. Can be null. |
Aspose::Words::UnsupportedFileFormatException | The document format is not recognized or not supported. |
Aspose::Words::FileCorruptedException | The document appears to be corrupted and cannot be loaded. |
System::Exception | There is a problem with the document and it should be reported to Aspose.Words developers. |
System::IO::IOException | There is an input/output exception. |
Aspose::Words::IncorrectPasswordException | The document is encrypted and requires a password to open, but you supplied an incorrect password. |
System::ArgumentNullException | The stream cannot be null. |
System::NotSupportedException | The stream does not support reading or seeking. |
System::ObjectDisposedException | The stream is a disposed object. |
Shows how to load the contents of an encrypted Microsoft Word document in plaintext using stream.
System::SharedPtr<Aspose::Words::Properties::BuiltInDocumentProperties> Aspose::Words::PlainTextDocument::get_BuiltInDocumentProperties | ( | ) | const |
Gets BuiltInDocumentProperties of the document.
Shows how to load the contents of a Microsoft Word document in plaintext and then access the original document's built-in properties.
System::SharedPtr<Aspose::Words::Properties::CustomDocumentProperties> Aspose::Words::PlainTextDocument::get_CustomDocumentProperties | ( | ) | const |
Gets CustomDocumentProperties of the document.
Shows how to load the contents of a Microsoft Word document in plaintext and then access the original document's custom properties.
System::String Aspose::Words::PlainTextDocument::get_Text | ( | ) | const |
Gets textual content of the document concatenated as a string.
Shows how to load the contents of a Microsoft Word document in plaintext.
|
overridevirtual |
Reimplemented from System::Object.
|
overridevirtual |
Reimplemented from System::Object.
|
static |