Nevron Open Vision Documentation
Saving Documents

NOV rich text view supports saving of text documents to TXT, RTF, DOCX, HTML, EPUB, PDF, NTB and NTX formats. Note that only the latter two will fully persists all the information in the document as the control supports features not present in HTML, RTF and DOCX. TXT format will preserve only the text content of the document, i.e. all formatting will be lost.

Saving Text Documents to File

In order to save a text document to a file you need to call the NRichTextView object SaveToFile method:

Saving a Text Document To File
Copy Code

By default the NOV rich text view analyzes the extension of the provided file name to determine the format to save to. If you want to specify the text format explicitely you can pass it as second parameter to the SaveToFile method:

Saving a Text Document To File Specifying the Text Format Explicitely
Copy Code
m_RichText.SaveToFile(@"C:\\MyDocument.docx", new NDocxTextFormat());
Saving Text Documents to Stream

Similarly if you want to perists the document content to a stream you can use the SaveToStream method:

Saving a Text Document To Stream
Copy Code
m_RichText.SaveToStream(stream, new NDocxTextFormat());
See Also
Send Feedback