Class EpubReader
The main entry point of the EpubReader library. The methods in this class let the consumer to open/read EPUB books from a file or a Stream.
Inherited Members
Namespace: VersOne.Epub
Assembly: VersOne.Epub.dll
Syntax
public static class EpubReader
Methods
View SourceOpenBook(Stream, EpubReaderOptions?)
Opens the book synchronously without reading its content. The object returned by this method holds a handle to the EPUB file.
Declaration
public static EpubBookRef OpenBook(Stream stream, EpubReaderOptions? epubReaderOptions)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | Seekable stream containing the EPUB file. |
EpubReaderOptions | epubReaderOptions | Various options to configure the behavior of the EPUB reader. |
Returns
Type | Description |
---|---|
EpubBookRef | EPUB book reference. This object holds a handle to the EPUB file. |
OpenBook(Stream, EpubReaderOptionsPreset)
Opens the book synchronously without reading its content. The object returned by this method holds a handle to the EPUB file.
Declaration
public static EpubBookRef OpenBook(Stream stream, EpubReaderOptionsPreset epubReaderOptionsPreset = EpubReaderOptionsPreset.RELAXED)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | Seekable stream containing the EPUB file. |
EpubReaderOptionsPreset | epubReaderOptionsPreset | A preset to configure the behavior of the EPUB reader.
Default value is |
Returns
Type | Description |
---|---|
EpubBookRef | EPUB book reference. This object holds a handle to the EPUB file. |
OpenBook(string, EpubReaderOptions?)
Opens the book synchronously without reading its content. The object returned by this method holds a handle to the EPUB file.
Declaration
public static EpubBookRef OpenBook(string filePath, EpubReaderOptions? epubReaderOptions)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | Path to the EPUB file. |
EpubReaderOptions | epubReaderOptions | Various options to configure the behavior of the EPUB reader. |
Returns
Type | Description |
---|---|
EpubBookRef | EPUB book reference. This object holds a handle to the EPUB file. |
OpenBook(string, EpubReaderOptionsPreset)
Opens the book synchronously without reading its content. The object returned by this method holds a handle to the EPUB file.
Declaration
public static EpubBookRef OpenBook(string filePath, EpubReaderOptionsPreset epubReaderOptionsPreset = EpubReaderOptionsPreset.RELAXED)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | Path to the EPUB file. |
EpubReaderOptionsPreset | epubReaderOptionsPreset | A preset to configure the behavior of the EPUB reader.
Default value is |
Returns
Type | Description |
---|---|
EpubBookRef | EPUB book reference. This object holds a handle to the EPUB file. |
OpenBookAsync(Stream, EpubReaderOptions?)
Opens the book asynchronously without reading its content. The object returned by this method holds a handle to the EPUB file.
Declaration
public static Task<EpubBookRef> OpenBookAsync(Stream stream, EpubReaderOptions? epubReaderOptions)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | Seekable stream containing the EPUB file. |
EpubReaderOptions | epubReaderOptions | Various options to configure the behavior of the EPUB reader. |
Returns
Type | Description |
---|---|
Task<EpubBookRef> | EPUB book reference. This object holds a handle to the EPUB file. |
OpenBookAsync(Stream, EpubReaderOptionsPreset)
Opens the book asynchronously without reading its content. The object returned by this method holds a handle to the EPUB file.
Declaration
public static Task<EpubBookRef> OpenBookAsync(Stream stream, EpubReaderOptionsPreset epubReaderOptionsPreset = EpubReaderOptionsPreset.RELAXED)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | Seekable stream containing the EPUB file. |
EpubReaderOptionsPreset | epubReaderOptionsPreset | A preset to configure the behavior of the EPUB reader.
Default value is |
Returns
Type | Description |
---|---|
Task<EpubBookRef> | EPUB book reference. This object holds a handle to the EPUB file. |
OpenBookAsync(string, EpubReaderOptions?)
Opens the book asynchronously without reading its content. The object returned by this method holds a handle to the EPUB file.
Declaration
public static Task<EpubBookRef> OpenBookAsync(string filePath, EpubReaderOptions? epubReaderOptions)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | Path to the EPUB file. |
EpubReaderOptions | epubReaderOptions | Various options to configure the behavior of the EPUB reader. |
Returns
Type | Description |
---|---|
Task<EpubBookRef> | EPUB book reference. This object holds a handle to the EPUB file. |
OpenBookAsync(string, EpubReaderOptionsPreset)
Opens the book asynchronously without reading its content. The object returned by this method holds a handle to the EPUB file.
Declaration
public static Task<EpubBookRef> OpenBookAsync(string filePath, EpubReaderOptionsPreset epubReaderOptionsPreset = EpubReaderOptionsPreset.RELAXED)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | Path to the EPUB file. |
EpubReaderOptionsPreset | epubReaderOptionsPreset | A preset to configure the behavior of the EPUB reader.
Default value is |
Returns
Type | Description |
---|---|
Task<EpubBookRef> | EPUB book reference. This object holds a handle to the EPUB file. |
ReadBook(Stream, EpubReaderOptions?)
Opens the book synchronously and reads all of its content into the memory. The object returned by this method does not retain a handle to the EPUB file.
Declaration
public static EpubBook ReadBook(Stream stream, EpubReaderOptions? epubReaderOptions)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | Seekable stream containing the EPUB file. |
EpubReaderOptions | epubReaderOptions | Various options to configure the behavior of the EPUB reader. |
Returns
Type | Description |
---|---|
EpubBook | EPUB book with all its content. This object does not retain a handle to the EPUB file. |
ReadBook(Stream, EpubReaderOptionsPreset)
Opens the book synchronously and reads all of its content into the memory. The object returned by this method does not retain a handle to the EPUB file.
Declaration
public static EpubBook ReadBook(Stream stream, EpubReaderOptionsPreset epubReaderOptionsPreset = EpubReaderOptionsPreset.RELAXED)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | Seekable stream containing the EPUB file. |
EpubReaderOptionsPreset | epubReaderOptionsPreset | A preset to configure the behavior of the EPUB reader.
Default value is |
Returns
Type | Description |
---|---|
EpubBook | EPUB book with all its content. This object does not retain a handle to the EPUB file. |
ReadBook(string, EpubReaderOptions?)
Opens the book synchronously and reads all of its content into the memory. The object returned by this method does not retain a handle to the EPUB file.
Declaration
public static EpubBook ReadBook(string filePath, EpubReaderOptions? epubReaderOptions)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | Path to the EPUB file. |
EpubReaderOptions | epubReaderOptions | Various options to configure the behavior of the EPUB reader. |
Returns
Type | Description |
---|---|
EpubBook | EPUB book with all its content. This object does not retain a handle to the EPUB file. |
ReadBook(string, EpubReaderOptionsPreset)
Opens the book synchronously and reads all of its content into the memory. The object returned by this method does not retain a handle to the EPUB file.
Declaration
public static EpubBook ReadBook(string filePath, EpubReaderOptionsPreset epubReaderOptionsPreset = EpubReaderOptionsPreset.RELAXED)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | Path to the EPUB file. |
EpubReaderOptionsPreset | epubReaderOptionsPreset | A preset to configure the behavior of the EPUB reader.
Default value is |
Returns
Type | Description |
---|---|
EpubBook | EPUB book with all its content. This object does not retain a handle to the EPUB file. |
ReadBookAsync(Stream, EpubReaderOptions?)
Opens the book asynchronously and reads all of its content into the memory. The object returned by this method does not retain a handle to the EPUB file.
Declaration
public static Task<EpubBook> ReadBookAsync(Stream stream, EpubReaderOptions? epubReaderOptions)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | Seekable stream containing the EPUB file. |
EpubReaderOptions | epubReaderOptions | Various options to configure the behavior of the EPUB reader. |
Returns
Type | Description |
---|---|
Task<EpubBook> | EPUB book with all its content. This object does not retain a handle to the EPUB file. |
ReadBookAsync(Stream, EpubReaderOptionsPreset)
Opens the book asynchronously and reads all of its content into the memory. The object returned by this method does not retain a handle to the EPUB file.
Declaration
public static Task<EpubBook> ReadBookAsync(Stream stream, EpubReaderOptionsPreset epubReaderOptionsPreset = EpubReaderOptionsPreset.RELAXED)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | Seekable stream containing the EPUB file. |
EpubReaderOptionsPreset | epubReaderOptionsPreset | A preset to configure the behavior of the EPUB reader.
Default value is |
Returns
Type | Description |
---|---|
Task<EpubBook> | EPUB book with all its content. This object does not retain a handle to the EPUB file. |
ReadBookAsync(string, EpubReaderOptions?)
Opens the book asynchronously and reads all of its content into the memory. The object returned by this method does not retain a handle to the EPUB file.
Declaration
public static Task<EpubBook> ReadBookAsync(string filePath, EpubReaderOptions? epubReaderOptions)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | Path to the EPUB file. |
EpubReaderOptions | epubReaderOptions | Various options to configure the behavior of the EPUB reader. |
Returns
Type | Description |
---|---|
Task<EpubBook> | EPUB book with all its content. This object does not retain a handle to the EPUB file. |
ReadBookAsync(string, EpubReaderOptionsPreset)
Opens the book asynchronously and reads all of its content into the memory. The object returned by this method does not retain a handle to the EPUB file.
Declaration
public static Task<EpubBook> ReadBookAsync(string filePath, EpubReaderOptionsPreset epubReaderOptionsPreset = EpubReaderOptionsPreset.RELAXED)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | Path to the EPUB file. |
EpubReaderOptionsPreset | epubReaderOptionsPreset | A preset to configure the behavior of the EPUB reader.
Default value is |
Returns
Type | Description |
---|---|
Task<EpubBook> | EPUB book with all its content. This object does not retain a handle to the EPUB file. |