Nevron Open Vision Documentation
Electronic Publications (EPUB)

NOV rich text view provides support for loading and saving documents as Electronic Publications, a.k.a. e-books in the EPUB format.

Loading Electronic Publications 

To load an electronic publication from a file or from a stream you can use the Load methods of the rich text view as shown in the Loading Documents topic.

Loading an Electronic Publication
Copy Code
richTextView.LoadFromFile(@"C:\MyBook.epub");
Saving Electronic Publications

To save a document as an Electronic Publication to a file or to a stream you can use the Save method of the rich text view as shown in the Saving Documents topic.

Saving an Electronic Publication
Copy Code
richTextView.SaveToFile(@"C:\MyBook.epub");

Electronic Publications are essentially a package that consists of XHTML, XML and image files and is compressed to a ZIP archive. By default NOV rich text view uses medium compression level when creating the EPUB package. The medium compression level is a nice compromise between speed and compression ratio. If you want to change the compression level of an EPUB package, you should pass an NEpubSaveSettings instance with the proper value set to its CompressionLevel to the Save method.

Saving an Electronic Publication with a different compression level
Copy Code
NEpubSaveSettings saveSettings = new NEpubSaveSettings();
saveSettings.CompressionLevel = ENCompressionLevel.BestCompression;
m_RichTextView.SaveToFile(@"C:\MyBook.epub", new NEpubTextFormat(), saveSettings);
See Also
Send Feedback